mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-05 23:27:38 +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
df8ce19144
commit
0645ad9632
@ -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
|
// Position status bar near the bottom of the logical screen, regardless of orientation
|
||||||
const auto screenHeight = renderer.getScreenHeight();
|
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;
|
int progressTextWidth = 0;
|
||||||
|
|
||||||
// Calculate progress in book
|
// Calculate progress in book
|
||||||
|
|||||||
@ -503,7 +503,9 @@ void TxtReaderActivity::renderStatusBar(const int orientedMarginRight, const int
|
|||||||
SETTINGS.hideBatteryPercentage == CrossPointSettings::HIDE_BATTERY_PERCENTAGE::HIDE_NEVER;
|
SETTINGS.hideBatteryPercentage == CrossPointSettings::HIDE_BATTERY_PERCENTAGE::HIDE_NEVER;
|
||||||
|
|
||||||
const auto screenHeight = renderer.getScreenHeight();
|
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;
|
int progressTextWidth = 0;
|
||||||
|
|
||||||
const float progress = totalPages > 0 ? (currentPage + 1) * 100.0f / totalPages : 0;
|
const float progress = totalPages > 0 ? (currentPage + 1) * 100.0f / totalPages : 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user