clang format fix

This commit is contained in:
Arthur Tazhitdinov 2026-02-03 12:20:35 +03:00
parent 2a94648828
commit 2b6927f083
2 changed files with 3 additions and 4 deletions

View File

@ -255,8 +255,7 @@ void EpubReaderActivity::jumpToPercent(int percent) {
// Convert percent into a byte-like absolute position across the spine sizes.
// Use an overflow-safe computation: (bookSize / 100) * percent + (bookSize % 100) * percent / 100
size_t targetSize =
(bookSize / 100) * static_cast<size_t>(percent) +
(bookSize % 100) * static_cast<size_t>(percent) / 100;
(bookSize / 100) * static_cast<size_t>(percent) + (bookSize % 100) * static_cast<size_t>(percent) / 100;
if (percent >= 100) {
// Ensure the final percent lands inside the last spine item.
targetSize = bookSize - 1;

View File

@ -106,14 +106,14 @@ void EpubReaderPercentSelectionActivity::renderScreen() {
renderer.drawCenteredText(UI_12_FONT_ID, 15, "Go to Position", true, EpdFontFamily::BOLD);
const std::string percentText = std::to_string(percent) + "%";
renderer.drawCenteredText(UI_12_FONT_ID, 70, percentText.c_str(), true, EpdFontFamily::BOLD);
renderer.drawCenteredText(UI_12_FONT_ID, 90, percentText.c_str(), true, EpdFontFamily::BOLD);
// Draw slider track.
const int screenWidth = renderer.getScreenWidth();
constexpr int barWidth = 360;
constexpr int barHeight = 16;
const int barX = (screenWidth - barWidth) / 2;
const int barY = 120;
const int barY = 140;
renderer.drawRect(barX, barY, barWidth, barHeight);