diff --git a/src/ScreenComponents.cpp b/src/ScreenComponents.cpp index 7b2d48f3..6ffff9a8 100644 --- a/src/ScreenComponents.cpp +++ b/src/ScreenComponents.cpp @@ -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); diff --git a/src/ScreenComponents.h b/src/ScreenComponents.h index 3132c92e..de1f9e20 100644 --- a/src/ScreenComponents.h +++ b/src/ScreenComponents.h @@ -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); diff --git a/src/activities/reader/EpubReaderActivity.cpp b/src/activities/reader/EpubReaderActivity.cpp index eb423c3c..664531fc 100644 --- a/src/activities/reader/EpubReaderActivity.cpp +++ b/src/activities/reader/EpubReaderActivity.cpp @@ -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) { diff --git a/src/activities/reader/TxtReaderActivity.cpp b/src/activities/reader/TxtReaderActivity.cpp index 289f9042..22bf0760 100644 --- a/src/activities/reader/TxtReaderActivity.cpp +++ b/src/activities/reader/TxtReaderActivity.cpp @@ -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;