mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 22:57:50 +03:00
Rename to bookProgressBarHeight
This commit is contained in:
parent
fc94455e27
commit
00fa98be30
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user