Rename to bookProgressBarHeight

This commit is contained in:
Yaroslav 2026-01-29 00:59:23 +03:00
parent fc94455e27
commit 00fa98be30
4 changed files with 6 additions and 6 deletions

View File

@ -49,12 +49,12 @@ void ScreenComponents::drawBookProgressBar(const GfxRenderer& renderer, const si
&vieweableMarginLeft);
const int progressBarMaxWidth = renderer.getScreenWidth() - vieweableMarginLeft - vieweableMarginRight;
const int progressBarY = renderer.getScreenHeight() - vieweableMarginBottom - BOOK_PROGRESS_BAR_HEIGHT();
const int progressBarY = renderer.getScreenHeight() - vieweableMarginBottom - bookProgressBarHeight();
const int barWidth = progressBarMaxWidth * bookProgress / 100;
renderer.fillRect(vieweableMarginLeft, progressBarY, barWidth, BOOK_PROGRESS_BAR_HEIGHT(), true);
renderer.fillRect(vieweableMarginLeft, progressBarY, barWidth, bookProgressBarHeight(), true);
}
int ScreenComponents::BOOK_PROGRESS_BAR_HEIGHT() {
int ScreenComponents::bookProgressBarHeight() {
const auto orientation = SETTINGS.orientation;
const bool isVertical = (orientation == CrossPointSettings::ORIENTATION::PORTRAIT ||
orientation == CrossPointSettings::ORIENTATION::INVERTED);

View File

@ -13,7 +13,7 @@ struct TabInfo {
class ScreenComponents {
public:
static int BOOK_PROGRESS_BAR_HEIGHT();
static int bookProgressBarHeight();
static void drawBattery(const GfxRenderer& renderer, int left, int top, bool showPercentage = true);
static void drawBookProgressBar(const GfxRenderer& renderer, size_t bookProgress);

View File

@ -293,7 +293,7 @@ void EpubReaderActivity::renderScreen() {
SETTINGS.statusBar == CrossPointSettings::STATUS_BAR_MODE::ONLY_PROGRESS_BAR;
orientedMarginBottom +=
statusBarMargin - SETTINGS.screenMargin +
(showProgressBar ? (ScreenComponents::BOOK_PROGRESS_BAR_HEIGHT() + progressBarMarginTop) : 0);
(showProgressBar ? (ScreenComponents::bookProgressBarHeight() + progressBarMarginTop) : 0);
}
if (!section) {

View File

@ -175,7 +175,7 @@ void TxtReaderActivity::initializeReader() {
SETTINGS.statusBar == CrossPointSettings::STATUS_BAR_MODE::ONLY_PROGRESS_BAR;
orientedMarginBottom +=
statusBarMargin - cachedScreenMargin +
(showProgressBar ? (ScreenComponents::BOOK_PROGRESS_BAR_HEIGHT() + progressBarMarginTop) : 0);
(showProgressBar ? (ScreenComponents::bookProgressBarHeight() + progressBarMarginTop) : 0);
}
viewportWidth = renderer.getScreenWidth() - orientedMarginLeft - orientedMarginRight;