fix(display): erase full icon height in boot carousel

The sun's lowest ray reached y+H, one row below the H-tall erase box,
leaving a stray dot/trail. Erase H+4 so nothing is left behind.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-25 13:55:53 +07:00
co-authored by Claude Opus 4.8
parent a0f96fc52d
commit d1f96007de
+4 -4
View File
@@ -111,12 +111,12 @@ void displayDemo() {
// slide in from the right edge to centre // slide in from the right edge to centre
int px = 160 + 12; int px = 160 + 12;
for (int x = 160; x >= cxc; x -= 12) { for (int x = 160; x >= cxc; x -= 12) {
tft.fillRect(px, y, W, H, ST77XX_BLACK); tft.fillRect(px, y, W, H + 4, ST77XX_BLACK);
drawIcon(cats[k], x, y, W, H); drawIcon(cats[k], x, y, W, H);
px = x; px = x;
delay(26); delay(26);
} }
tft.fillRect(px, y, W, H, ST77XX_BLACK); tft.fillRect(px, y, W, H + 4, ST77XX_BLACK);
drawIcon(cats[k], cxc, y, W, H); drawIcon(cats[k], cxc, y, W, H);
// label centred below in the category colour // label centred below in the category colour
int len = 0; while (names[k][len]) len++; // size 2 = 12 px/char int len = 0; while (names[k][len]) len++; // size 2 = 12 px/char
@@ -129,12 +129,12 @@ void displayDemo() {
// slide out to the left edge // slide out to the left edge
px = cxc; px = cxc;
for (int x = cxc - 12; x >= -W; x -= 12) { for (int x = cxc - 12; x >= -W; x -= 12) {
tft.fillRect(px, y, W, H, ST77XX_BLACK); tft.fillRect(px, y, W, H + 4, ST77XX_BLACK);
drawIcon(cats[k], x, y, W, H); drawIcon(cats[k], x, y, W, H);
px = x; px = x;
delay(24); delay(24);
} }
tft.fillRect(px, y, W, H, ST77XX_BLACK); // clear the last remnant tft.fillRect(px, y, W, H + 4, ST77XX_BLACK); // clear the last remnant
} }
tft.setTextColor(ST77XX_WHITE); tft.setTextColor(ST77XX_WHITE);
} }