feat(ui): pill unread badges, unified DM/CH headers, trimmed home carousel

UI-polish trio from CODE_REVIEW (biggest "feels finished" gain per line):

- Pill unread badges: new DisplayDriver::drawUnreadBadge()/unreadBadgeWidth()
  draw a filled capsule with the count knocked out (corners knocked back for a
  rounded look; inverts on a selected row). Replaces the bare right-aligned
  digits in MODE_SELECT, the contact/channel pickers and favourites tiles.
  No <stdio.h> in the header — fmtBadgeCount formats manually, clamps to 99+.
- Unified DM/CH history headers: DM_HIST and CHANNEL_HIST drew their titles by
  hand (drawTextCentered + fillRect at lh+1), a different height/separator than
  every other screen. Both now route through drawCenteredHeader().
- Trimmed default home carousel: new NodePrefs::HP_DEFAULT (Clock, Tools,
  Shutdown, Favourites, Map; Messages + Settings always visible = 7 pages).
  applyDefaults() seeds it instead of HP_ALL. Recent/Radio/BT/Advert/GPS/Sensors
  are opt-in via Settings > Home Pages. Existing users keep their saved mask —
  factory default only; no migration, no schema bump.

Both solo envs build green (OLED RAM 69.9%/Flash 62.8%; e-ink SUCCESS).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-07-07 01:12:51 +02:00
parent 58e07900db
commit 8e5b02f0a6
5 changed files with 61 additions and 44 deletions

View File

@@ -1543,7 +1543,7 @@ MyMesh::MyMesh(mesh::Radio &radio, mesh::RNG &rng, mesh::RTCClock &rtc, SimpleMe
_prefs.ringtone2_bpm_idx = 2; // 120 bpm default
_prefs.notif_melody_ad = 0; // built-in advert sound by default
_prefs.advert_sound_scope = ADVERT_SOUND_SCOPE_ALL; // sound every advert by default
_prefs.home_pages_mask = NodePrefs::HP_ALL; // all pages visible (incl. Favourites + Map)
_prefs.home_pages_mask = NodePrefs::HP_DEFAULT; // curated everyday carousel; rest opt-in via Home Pages
_prefs.bot_enabled = 0;
_prefs.bot_channel_enabled = 0;
_prefs.bot_channel_idx = 0;