mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 19:02:00 +00:00
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:
@@ -22,31 +22,22 @@ public:
|
||||
|
||||
void onShow() override { _dirty = false; }
|
||||
|
||||
// One value row, drawn like every other settings list (LEFT/RIGHT or Enter
|
||||
// cycles, Back saves) instead of a screen of its own with typed hints.
|
||||
int render(DisplayDriver& display) override {
|
||||
display.setTextSize(1);
|
||||
display.setColor(DisplayDriver::LIGHT);
|
||||
int label_y = display.listStart();
|
||||
int bar_y = label_y + display.lineStep();
|
||||
int bar_h = display.lineStep();
|
||||
int tip_y = bar_y + bar_h + 4;
|
||||
|
||||
display.drawCenteredHeader("AUTO-ADVERT");
|
||||
|
||||
display.setCursor(2, label_y);
|
||||
display.print("Interval:");
|
||||
|
||||
int idx = currentIdx();
|
||||
display.setColor(DisplayDriver::LIGHT);
|
||||
display.fillRect(0, bar_y, display.width(), bar_h);
|
||||
display.setColor(DisplayDriver::DARK);
|
||||
display.drawTextCentered(display.width() / 2, bar_y + 1, OPT_LABELS[idx]);
|
||||
display.setColor(DisplayDriver::LIGHT);
|
||||
|
||||
display.setCursor(2, tip_y);
|
||||
display.print("< > to change");
|
||||
display.setCursor(2, tip_y + display.lineStep());
|
||||
display.print("[Esc] to save");
|
||||
return 500;
|
||||
const int valx = display.width() / 2 + 6;
|
||||
int sel = 0, scroll = 0;
|
||||
drawList(display, 1, sel, scroll, [&](int, int y, bool is_sel, int reserve) {
|
||||
drawRowSelection(display, y, is_sel, reserve);
|
||||
display.setCursor(4, y);
|
||||
display.print("Interval");
|
||||
display.setCursor(valx, y);
|
||||
display.print(OPT_LABELS[currentIdx()]);
|
||||
});
|
||||
return 5000;
|
||||
}
|
||||
|
||||
bool handleInput(char c) override {
|
||||
|
||||
Reference in New Issue
Block a user