From 0daa9db24377cd230164b8c77d8f2d38aa3ac0a2 Mon Sep 17 00:00:00 2001 From: Julia Date: Fri, 26 Jun 2026 12:26:33 -0400 Subject: [PATCH] fix: keep status bar indicators stable when toggling bookmarks (#2444) --- src/components/themes/BaseTheme.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/themes/BaseTheme.cpp b/src/components/themes/BaseTheme.cpp index 15b2d569..735f1477 100644 --- a/src/components/themes/BaseTheme.cpp +++ b/src/components/themes/BaseTheme.cpp @@ -803,13 +803,6 @@ void BaseTheme::drawStatusBar(GfxRenderer& renderer, const float bookProgress, c 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 const bool showBatteryPercentage = 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 if (!title.empty()) { textY -= textYOffset;