Refactor ui content rect

This commit is contained in:
jpirnay
2026-03-10 19:11:30 +01:00
parent 0a4a369d25
commit 2008060a81
30 changed files with 304 additions and 303 deletions
@@ -65,10 +65,10 @@ void EpubReaderPercentSelectionActivity::render(RenderLock&&) {
renderer.drawCenteredText(UI_12_FONT_ID, 90, percentText.c_str(), true, EpdFontFamily::BOLD);
// Draw slider track.
const int screenWidth = renderer.getScreenWidth();
const Rect contentRect = UITheme::getContentRect(renderer, true, false);
constexpr int barWidth = 360;
constexpr int barHeight = 16;
const int barX = (screenWidth - barWidth) / 2;
const int barX = contentRect.x + (contentRect.width - barWidth) / 2;
const int barY = 140;
renderer.drawRect(barX, barY, barWidth, barHeight);