From 72ceb44a60d41d7b7da0fab708c240ae5ab50d07 Mon Sep 17 00:00:00 2001 From: Jason P Date: Sun, 8 Jun 2025 18:28:18 -0500 Subject: [PATCH] Flip Seconds and AM/PM on Clock Display --- src/graphics/draw/ClockRenderer.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/graphics/draw/ClockRenderer.cpp b/src/graphics/draw/ClockRenderer.cpp index 843f867cd..51724a2ef 100644 --- a/src/graphics/draw/ClockRenderer.cpp +++ b/src/graphics/draw/ClockRenderer.cpp @@ -275,17 +275,18 @@ void drawDigitalClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int1 // draw seconds string display->setFont(FONT_SMALL); int xOffset = (SCREEN_WIDTH > 128) ? 0 : 0; - if (hour >= 10 && hour < 20) { - xOffset += (SCREEN_WIDTH > 128) ? 0 : 15; + if (hour >= 10) { + xOffset += (SCREEN_WIDTH > 128) ? 0 : 17; } int yOffset = (SCREEN_WIDTH > 128) ? 3 : 1; - display->drawString(startingHourMinuteTextX + xOffset, (display->getHeight() - hourMinuteTextY) - yOffset, secondString); - if (config.display.use_12h_clock) { - xOffset = (SCREEN_WIDTH > 128) ? 20 : 13; - display->drawString(startingHourMinuteTextX + timeStringWidth - xOffset, - (display->getHeight() - hourMinuteTextY) - yOffset - 2, isPM ? "pm" : "am"); + display->drawString(startingHourMinuteTextX + xOffset, (display->getHeight() - hourMinuteTextY) - yOffset - 2, + isPM ? "pm" : "am"); } + + xOffset = (SCREEN_WIDTH > 128) ? 18 : 10; + display->drawString(startingHourMinuteTextX + timeStringWidth - xOffset, + (display->getHeight() - hourMinuteTextY) - yOffset, secondString); } }