mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 22:57:50 +03:00
Rename progress bar height variable and make 6 pixels
This commit is contained in:
parent
30b56eb977
commit
1beef69f82
@ -80,9 +80,9 @@ void ScreenComponents::drawBookProgressBar(const GfxRenderer& renderer, const si
|
|||||||
&vieweableMarginLeft);
|
&vieweableMarginLeft);
|
||||||
|
|
||||||
const int progressBarMaxWidth = renderer.getScreenWidth() - vieweableMarginLeft - vieweableMarginRight;
|
const int progressBarMaxWidth = renderer.getScreenWidth() - vieweableMarginLeft - vieweableMarginRight;
|
||||||
const int progressBarY = renderer.getScreenHeight() - vieweableMarginBottom - BOOK_PROGRESS_BAR_HEIGHT;
|
const int progressBarY = renderer.getScreenHeight() - vieweableMarginBottom - PROGRESS_BAR_HEIGHT;
|
||||||
const int barWidth = progressBarMaxWidth * bookProgress / 100;
|
const int barWidth = progressBarMaxWidth * bookProgress / 100;
|
||||||
renderer.fillRect(vieweableMarginLeft, progressBarY, barWidth, BOOK_PROGRESS_BAR_HEIGHT, true);
|
renderer.fillRect(vieweableMarginLeft, progressBarY, barWidth, PROGRESS_BAR_HEIGHT, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenComponents::drawChapterProgressBar(const GfxRenderer& renderer, const size_t chapterProgress) {
|
void ScreenComponents::drawChapterProgressBar(const GfxRenderer& renderer, const size_t chapterProgress) {
|
||||||
@ -91,9 +91,9 @@ void ScreenComponents::drawChapterProgressBar(const GfxRenderer& renderer, const
|
|||||||
&vieweableMarginLeft);
|
&vieweableMarginLeft);
|
||||||
|
|
||||||
const int progressBarMaxWidth = renderer.getScreenWidth() - vieweableMarginLeft - vieweableMarginRight;
|
const int progressBarMaxWidth = renderer.getScreenWidth() - vieweableMarginLeft - vieweableMarginRight;
|
||||||
const int progressBarY = renderer.getScreenHeight() - vieweableMarginBottom - BOOK_PROGRESS_BAR_HEIGHT;
|
const int progressBarY = renderer.getScreenHeight() - vieweableMarginBottom - PROGRESS_BAR_HEIGHT;
|
||||||
const int barWidth = progressBarMaxWidth * chapterProgress / 100;
|
const int barWidth = progressBarMaxWidth * chapterProgress / 100;
|
||||||
renderer.fillRect(vieweableMarginLeft, progressBarY, barWidth, BOOK_PROGRESS_BAR_HEIGHT, true);
|
renderer.fillRect(vieweableMarginLeft, progressBarY, barWidth, PROGRESS_BAR_HEIGHT, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ScreenComponents::drawTabBar(const GfxRenderer& renderer, const int y, const std::vector<TabInfo>& tabs) {
|
int ScreenComponents::drawTabBar(const GfxRenderer& renderer, const int y, const std::vector<TabInfo>& tabs) {
|
||||||
|
|||||||
@ -13,7 +13,7 @@ struct TabInfo {
|
|||||||
|
|
||||||
class ScreenComponents {
|
class ScreenComponents {
|
||||||
public:
|
public:
|
||||||
static const int BOOK_PROGRESS_BAR_HEIGHT = 4;
|
static const int PROGRESS_BAR_HEIGHT = 6;
|
||||||
|
|
||||||
struct PopupLayout {
|
struct PopupLayout {
|
||||||
int x;
|
int x;
|
||||||
|
|||||||
@ -353,7 +353,7 @@ void EpubReaderActivity::renderScreen() {
|
|||||||
const bool showProgressBar = SETTINGS.statusBar == CrossPointSettings::STATUS_BAR_MODE::FULL_WITH_PROGRESS_BAR ||
|
const bool showProgressBar = SETTINGS.statusBar == CrossPointSettings::STATUS_BAR_MODE::FULL_WITH_PROGRESS_BAR ||
|
||||||
SETTINGS.statusBar == CrossPointSettings::STATUS_BAR_MODE::ONLY_PROGRESS_BAR;
|
SETTINGS.statusBar == CrossPointSettings::STATUS_BAR_MODE::ONLY_PROGRESS_BAR;
|
||||||
orientedMarginBottom += statusBarMargin - SETTINGS.screenMargin +
|
orientedMarginBottom += statusBarMargin - SETTINGS.screenMargin +
|
||||||
(showProgressBar ? (ScreenComponents::BOOK_PROGRESS_BAR_HEIGHT + progressBarMarginTop) : 0);
|
(showProgressBar ? (ScreenComponents::PROGRESS_BAR_HEIGHT + progressBarMarginTop) : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!section) {
|
if (!section) {
|
||||||
|
|||||||
@ -174,7 +174,7 @@ void TxtReaderActivity::initializeReader() {
|
|||||||
const bool showProgressBar = SETTINGS.statusBar == CrossPointSettings::STATUS_BAR_MODE::FULL_WITH_PROGRESS_BAR ||
|
const bool showProgressBar = SETTINGS.statusBar == CrossPointSettings::STATUS_BAR_MODE::FULL_WITH_PROGRESS_BAR ||
|
||||||
SETTINGS.statusBar == CrossPointSettings::STATUS_BAR_MODE::ONLY_PROGRESS_BAR;
|
SETTINGS.statusBar == CrossPointSettings::STATUS_BAR_MODE::ONLY_PROGRESS_BAR;
|
||||||
orientedMarginBottom += statusBarMargin - cachedScreenMargin +
|
orientedMarginBottom += statusBarMargin - cachedScreenMargin +
|
||||||
(showProgressBar ? (ScreenComponents::BOOK_PROGRESS_BAR_HEIGHT + progressBarMarginTop) : 0);
|
(showProgressBar ? (ScreenComponents::PROGRESS_BAR_HEIGHT + progressBarMarginTop) : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
viewportWidth = renderer.getScreenWidth() - orientedMarginLeft - orientedMarginRight;
|
viewportWidth = renderer.getScreenWidth() - orientedMarginLeft - orientedMarginRight;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user