refactor(eink): Text size and Icon size as schema settings, on opt-in builds only

Review follow-up:

- The rows exist only where the build asks for them: Text size with
  EINK_FONT_SCALE, Icon size with STATUS_ICON_SCALE. The stock 2.13", the
  portrait builds and the L2 don't get them -- their screens are laid out
  for one cell size. The text override also applies in landscape only.
- Stored in NodePrefs (ui_text_scale, ui_icon_scale) instead of a
  /ui_scale file, as rows in the schema's Display section: the usual row,
  save path and factory reset, and console keys display.text.size /
  display.icon.size. The hand-written Settings rows and the load/save code
  are gone; UITask::applyUiScale() applies the prefs at boot and on change
  (applyDisplayPrefs). On opt-in builds ui_text_scale starts at the
  build's EINK_FONT_SCALE (DataStore sanitize), so the row shows the scale
  in use.
- EINK_FONT_SCALE, when set, now scales whichever landscape font the build
  picks (the 6x9, or the EINK_LARGE_FONT one); unset, it is stock as before.
- setUiScale() skips the re-layout and full redraw when nothing changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pmow
2026-10-10 16:36:39 -10:00
co-authored by Claude Opus 5.5
parent c06b394144
commit 13531dd2ce
11 changed files with 74 additions and 114 deletions
+9
View File
@@ -538,6 +538,15 @@ struct NodePrefs { // persisted to file
static const uint8_t MSG_ALERT_NORMAL = 0, MSG_ALERT_COMPACT = 1, MSG_ALERT_OFF = 2;
uint8_t msg_alert;
// ── Text and icon size (ui-new, big e-ink panels) ──────────────────────
// Settings > Display, only on builds that opt in (EINK_FONT_SCALE /
// STATUS_ICON_SCALE). ui_text_scale: the font's pixel multiplier, 1-5; 0 is
// the build's own (DataStore sanitize sets EINK_FONT_SCALE there).
// ui_icon_scale: Home's status icons, 0 = Auto (1.5x the text), else 1-8.
static const uint8_t UI_TEXT_SCALE_MAX = 5, UI_ICON_SCALE_MAX = 8;
uint8_t ui_text_scale;
uint8_t ui_icon_scale;
// Single source of truth for the live-share option tables (shared by the Map
// UI labels and the auto-send engine in UITask).
static const uint8_t LOC_SHARE_MOVE_COUNT = 4;