feat(l1): one soft-cornered frame for popups, alerts and bubbles; small screen fixes

DisplayDriver gets drawSoftRect / fillSoftRect / drawPanel (the unread badge's
corner knockout; a panel also clears a 1 px moat so lines below stop short of
its border). Used by alerts, popups, the accent picker, the lock hint, chat
bubbles and the send button.

Fixes: no "Msg:" toast for a message landing in the open thread; Nodes scan
text fits the screen; the PIN pad skips the blanks beside 0; Auto-Advert is a
plain value row; the Admin picker says what it needs when empty; the GPS page
shows "-" instead of 999 before a first fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-01 22:13:11 +02:00
co-authored by Claude Opus 5.5
parent a6612ee2b0
commit 1580de53f5
7 changed files with 72 additions and 49 deletions
+27
View File
@@ -193,6 +193,33 @@ public:
}
}
// Soft-cornered boxes: the same corner-pixel knockout as drawUnreadBadge(),
// shared by bubbles, popups, alerts and hints so every box reads alike.
// Outline only, corners left out; line thickness follows sepH().
void drawSoftRect(int x, int y, int w, int h) {
int t = sepH();
fillRect(x + 1, y, w - 2, t);
fillRect(x + 1, y + h - t, w - 2, t);
fillRect(x, y + 1, t, h - 2);
fillRect(x + w - t, y + 1, t, h - 2);
}
// Filled in the current colour; the four corner pixels aren't painted, so
// they keep whatever is under them.
void fillSoftRect(int x, int y, int w, int h) {
fillRect(x + 1, y, w - 2, h);
fillRect(x, y + 1, 1, h - 2);
fillRect(x + w - 1, y + 1, 1, h - 2);
}
// A box floating over the screen (alert, popup, hint): clears a 1 px moat
// around it so lines of the view below stop short of the border instead of
// running into it, fills it dark and draws the soft border. Leaves ink LIGHT.
void drawPanel(int x, int y, int w, int h) {
setColor(DARK);
fillRect(x - 1, y - 1, w + 2, h + 2);
setColor(LIGHT);
drawSoftRect(x, y, w, h);
}
// Format a small unread count into buf: "1".."99", then "99+". count >= 1.
// No stdio — DisplayDriver.h only pulls stdint/string.
// overflow: the count itself is honest (how many still-held entries are