From ec601ef11825a9f417789aa9b37ab0835f471d8c Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Fri, 15 May 2026 15:48:05 +0200 Subject: [PATCH] fix: renderBar always shows slot outlines regardless of value Previously empty slots used drawRect and filled slots used fillRect, so at max value (e.g. volume=4) no drawRect was called and no slot borders were visible when selected (inverted colors). Brightness at default (2/5) always had visible outlines, making the two bars look inconsistent. Now drawRect is called for every slot, with fillRect(+1,+1,w-2,h-2) on top for filled ones. All 5 slots are always visually distinct. Co-Authored-By: Claude Sonnet 4.6 --- examples/companion_radio/ui-new/UITask.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index ff1eaf0e..b14b2e67 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -183,8 +183,9 @@ class SettingsScreen : public UIScreen { const int box_w = 7, box_h = 7, gap = 2; for (int i = 0; i < max_val; i++) { int bx = x + i * (box_w + gap); - if (i < value) display.fillRect(bx, y, box_w, box_h); - else display.drawRect(bx, y, box_w, box_h); + display.drawRect(bx, y, box_w, box_h); + if (i < value) + display.fillRect(bx + 1, y + 1, box_w - 2, box_h - 2); } }