fix: adaptive layout for e-ink landscape across all remaining screens

- GxEPDDisplay: sz2 uses 4× scale on landscape (clock 32px vs body 16px)
- UITask: clock date_y and splash date_y computed from lh2 after setTextSize(2)
- UITask: battery/mute/BT/advert indicators scale with lh; muted uses text 'M'
- UITask: hibernate hint split into two lines to prevent wrapping
- ToolsScreen: full refactor — headerH, listStart, lineStep, getCharWidth
- KeyboardWidget: all cell sizes computed from display metrics (cell_w, cell_h, spec_w)
- RingtoneEditorScreen: cell_w = charWidth×2+6 (was hardcoded 18)
- SettingsScreen: BRIGHTNESS hidden on e-ink; renderBar boxes scale with lh

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-22 18:34:20 +02:00
parent f8fb1dac99
commit 1d8ca25469
7 changed files with 93 additions and 62 deletions

View File

@@ -92,7 +92,7 @@ void GxEPDDisplay::setTextSize(int sz) {
break;
case 2:
display.setFont(NULL);
display.setTextSize(2);
display.setTextSize((width() >= height()) ? 4 : 2);
break;
default:
display.setFont(_use_lemon ? &Lemon : NULL);

View File

@@ -73,13 +73,13 @@ public:
int getCharWidth() const override {
int sc = (width() >= height()) ? 2 : 1;
if (_text_sz == 3) return 17;
if (_text_sz == 2) return 12;
if (_text_sz == 2) return 12 * sc;
return (_use_lemon ? 5 : 6) * sc;
}
int getLineHeight() const override {
int sc = (width() >= height()) ? 2 : 1;
if (_text_sz == 3) return 28;
if (_text_sz == 2) return 16;
if (_text_sz == 2) return 16 * sc;
return (_use_lemon ? 10 : 8) * sc;
}
void setLemonFont(bool enabled) override { _use_lemon = enabled; }