Fix text overlap with chapter progress bar by adjusting textY position

Co-authored-by: lukestein <44452336+lukestein@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-01-31 21:36:08 +00:00 committed by Luke Stein
parent df8ce19144
commit 0645ad9632
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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;