mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 22:57:50 +03:00
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:
parent
7667935aed
commit
547d1e4963
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user