fix: keep status bar indicators stable when toggling bookmarks (#2444)
This commit is contained in:
1 parent
a2f2eea79e
commit
0daa9db243
1 file changed
+9
-7
@@ -803,13 +803,6 @@ void BaseTheme::drawStatusBar(GfxRenderer& renderer, const float bookProgress, c
|
|||||||
renderer.fillRect(barMarginLeft, progressBarY, barWidth, barHeight, true);
|
renderer.fillRect(barMarginLeft, progressBarY, barWidth, barHeight, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw Bookmark
|
|
||||||
if (showStatusBarTextLane && isPageBookmarked) {
|
|
||||||
const int bookmarkY = textY + 5;
|
|
||||||
drawBookmarkStatusIcon(renderer, leftClusterX, bookmarkY);
|
|
||||||
leftClusterWidth += bookmarkStatusIconWidth + bookmarkStatusIconGap;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw Battery
|
// Draw Battery
|
||||||
const bool showBatteryPercentage =
|
const bool showBatteryPercentage =
|
||||||
SETTINGS.hideBatteryPercentage == CrossPointSettings::HIDE_BATTERY_PERCENTAGE::HIDE_NEVER;
|
SETTINGS.hideBatteryPercentage == CrossPointSettings::HIDE_BATTERY_PERCENTAGE::HIDE_NEVER;
|
||||||
@@ -848,6 +841,15 @@ void BaseTheme::drawStatusBar(GfxRenderer& renderer, const float bookProgress, c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Draw Bookmark
|
||||||
|
if (showStatusBarTextLane && isPageBookmarked) {
|
||||||
|
const int bookmarkGap = leftClusterWidth > 0 ? bookmarkStatusIconGap : 0;
|
||||||
|
const int bookmarkX = leftClusterX + leftClusterWidth + bookmarkGap;
|
||||||
|
const int bookmarkY = textY + 5;
|
||||||
|
drawBookmarkStatusIcon(renderer, bookmarkX, bookmarkY);
|
||||||
|
leftClusterWidth += bookmarkStatusIconWidth + bookmarkGap;
|
||||||
|
}
|
||||||
|
|
||||||
// Draw Title
|
// Draw Title
|
||||||
if (!title.empty()) {
|
if (!title.empty()) {
|
||||||
textY -= textYOffset;
|
textY -= textYOffset;
|
||||||
|
|||||||
Reference in new issue
Block a user