Review comments

This commit is contained in:
jpirnay
2026-05-07 19:06:48 +02:00
parent f127ec8f9e
commit b56666c96e
2 changed files with 13 additions and 1 deletions
@@ -81,11 +81,18 @@ void drawPreviewStatusItems(const GfxRenderer& renderer, const Rect& rect, const
const bool showBatteryPercentage =
SETTINGS.statusBarBattery &&
SETTINGS.hideBatteryPercentage == CrossPointSettings::HIDE_BATTERY_PERCENTAGE::HIDE_NEVER;
const bool showClock = SETTINGS.useClock && SETTINGS.statusBarClock;
const int previewClockWidth = showClock ? renderer.getTextWidth(SMALL_FONT_ID, "00:00") : 0;
if (SETTINGS.statusBarBattery) {
GUI.drawBatteryLeft(renderer,
Rect{rect.x + previewInnerMargin + 2, textY, metrics.batteryWidth, metrics.batteryHeight},
showBatteryPercentage);
}
if (showClock) {
const int clockX = rect.x + previewInnerMargin + (SETTINGS.statusBarBattery ? metrics.batteryWidth + 8 : 0);
renderer.drawText(SMALL_FONT_ID, clockX, textY, "00:00");
}
int progressTextWidth = 0;
if (hasProgressText) {
@@ -118,6 +125,11 @@ void drawPreviewStatusItems(const GfxRenderer& renderer, const Rect& rect, const
renderer.getTextWidth(SMALL_FONT_ID, "100%") + 8;
leftReserve = std::max(leftReserve, percentReserve);
}
if (showClock) {
leftReserve += previewClockWidth + 8;
}
} else if (showClock) {
leftReserve = std::max(leftReserve, previewClockWidth + 8);
}
const int rightReserve = progressTextWidth > 0 ? progressTextWidth + 18 : 6;
const int titleAreaWidth = rect.width - previewInnerMargin * 2 - leftReserve - rightReserve;
+1 -1
View File
@@ -853,7 +853,7 @@ void BaseTheme::drawStatusBar(GfxRenderer& renderer, const float bookProgress, c
}
// Draw Title
if (!title.empty()) {
if (SETTINGS.statusBarTitle != CrossPointSettings::STATUS_BAR_TITLE::HIDE_TITLE && !title.empty()) {
const int rendererableScreenWidth =
screenWidth - (metrics.statusBarHorizontalMargin * 2) - orientedMarginLeft - orientedMarginRight;