From 0645ad96326bae22ae57731a3b7e2fa4b0e10c99 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 31 Jan 2026 21:36:08 +0000 Subject: [PATCH] Fix text overlap with chapter progress bar by adjusting textY position Co-authored-by: lukestein <44452336+lukestein@users.noreply.github.com> --- src/activities/reader/EpubReaderActivity.cpp | 4 +++- src/activities/reader/TxtReaderActivity.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/activities/reader/EpubReaderActivity.cpp b/src/activities/reader/EpubReaderActivity.cpp index 24225fb9..e22c0df6 100644 --- a/src/activities/reader/EpubReaderActivity.cpp +++ b/src/activities/reader/EpubReaderActivity.cpp @@ -512,7 +512,9 @@ void EpubReaderActivity::renderStatusBar(const int orientedMarginRight, const in // Position status bar near the bottom of the logical screen, regardless of orientation const auto screenHeight = renderer.getScreenHeight(); - const auto textY = screenHeight - orientedMarginBottom - 4; + // Adjust text position upward when progress bar is shown to avoid overlap + const auto textY = screenHeight - orientedMarginBottom - 4 - + ((showProgressBar || showChapterProgressBar) ? ScreenComponents::PROGRESS_BAR_HEIGHT + 2 : 0); int progressTextWidth = 0; // Calculate progress in book diff --git a/src/activities/reader/TxtReaderActivity.cpp b/src/activities/reader/TxtReaderActivity.cpp index e4be7fa8..c9de9b4f 100644 --- a/src/activities/reader/TxtReaderActivity.cpp +++ b/src/activities/reader/TxtReaderActivity.cpp @@ -503,7 +503,9 @@ void TxtReaderActivity::renderStatusBar(const int orientedMarginRight, const int SETTINGS.hideBatteryPercentage == CrossPointSettings::HIDE_BATTERY_PERCENTAGE::HIDE_NEVER; const auto screenHeight = renderer.getScreenHeight(); - const auto textY = screenHeight - orientedMarginBottom - 4; + // Adjust text position upward when progress bar is shown to avoid overlap + const auto textY = screenHeight - orientedMarginBottom - 4 - + ((showProgressBar || showChapterProgressBar) ? ScreenComponents::PROGRESS_BAR_HEIGHT + 2 : 0); int progressTextWidth = 0; const float progress = totalPages > 0 ? (currentPage + 1) * 100.0f / totalPages : 0;