Review updates
This commit is contained in:
@@ -1867,8 +1867,10 @@ bool EpubReaderActivity::drawCurrentPageToBuffer(const std::string& filePath, Gf
|
||||
return false;
|
||||
}
|
||||
|
||||
const int imageOnlyOffset = getImageOnlyPageYOffset(*page, viewportHeight);
|
||||
const int renderMarginTop = marginTop + imageOnlyOffset;
|
||||
renderer.clearScreen();
|
||||
page->render(renderer, effectiveFontId, marginLeft, marginTop);
|
||||
page->render(renderer, effectiveFontId, marginLeft, renderMarginTop);
|
||||
// No displayBuffer call — caller (SleepActivity) handles that after compositing the overlay
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ void drawPreviewProgressBar(const GfxRenderer& renderer, const Rect& rect, const
|
||||
}
|
||||
|
||||
const int percent = progressBar == CrossPointSettings::STATUS_BAR_PROGRESS_BAR::BOOK_PROGRESS ? 75 : 25;
|
||||
const int barHeight = (thickness + 1) * 2;
|
||||
const int barHeight = UITheme::getProgressBarHeight(progressBar, thickness);
|
||||
const int y = topEdge ? rect.y + previewInnerMargin : rect.y + rect.height - previewInnerMargin - barHeight;
|
||||
const int barWidth = (rect.width - previewInnerMargin * 2) * percent / 100;
|
||||
renderer.fillRect(rect.x + previewInnerMargin, y, barWidth, barHeight);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <Logging.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
@@ -61,7 +62,7 @@ int progressBarPixelHeight(const uint8_t progressBar, const uint8_t thickness, c
|
||||
int statusBarProgressPercent(const uint8_t progressBar, const float bookProgress, const int currentPage,
|
||||
const int pageCount) {
|
||||
if (progressBar == CrossPointSettings::STATUS_BAR_PROGRESS_BAR::BOOK_PROGRESS) {
|
||||
return std::clamp(static_cast<int>(bookProgress), 0, 100);
|
||||
return std::clamp(static_cast<int>(std::lround(bookProgress)), 0, 100);
|
||||
}
|
||||
const int chapterProgress =
|
||||
(pageCount > 0) ? static_cast<int>((static_cast<float>(currentPage) / pageCount) * 100) : 0;
|
||||
|
||||
Reference in New Issue
Block a user