From 547d1e4963355f0d62403964ddf9e4d1c6831a8f 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 46a96f5a..906dc77e 100644 --- a/src/activities/reader/EpubReaderActivity.cpp +++ b/src/activities/reader/EpubReaderActivity.cpp @@ -484,7 +484,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 ea9aae14..7c1daf08 100644 --- a/src/activities/reader/TxtReaderActivity.cpp +++ b/src/activities/reader/TxtReaderActivity.cpp @@ -535,7 +535,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;