From 22ee164ff6e122273c40d02f80bfb1296b26cb7f Mon Sep 17 00:00:00 2001 From: Adam Mealings Date: Wed, 14 May 2025 22:17:54 +0100 Subject: [PATCH] Make the battery fill based on the percentage slightly smaller to give it a more modern look --- examples/companion_radio/UITask.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/companion_radio/UITask.cpp b/examples/companion_radio/UITask.cpp index e0c2ec51..79224de6 100644 --- a/examples/companion_radio/UITask.cpp +++ b/examples/companion_radio/UITask.cpp @@ -107,8 +107,8 @@ void renderBatteryIndicator(DisplayDriver* _display, uint16_t batteryMilliVolts) _display->fillRect(iconX + iconWidth, iconY + (iconHeight / 4), 3, iconHeight / 2); // fill the battery based on the percentage - int fillWidth = (batteryPercentage * (iconWidth - 2)) / 100; - _display->fillRect(iconX + 1, iconY + 1, fillWidth, iconHeight - 2); + int fillWidth = (batteryPercentage * (iconWidth - 4)) / 100; + _display->fillRect(iconX + 2, iconY + 2, fillWidth, iconHeight - 4); } void UITask::renderCurrScreen() {