feat(l2): light theme reworked - a tint for selected, grey values, quiet edges

The light theme read as the dark one inverted. Now something selected (a
tab, a segment, a tile, Fav) is a tint of the accent with the accent's text
(SEL_*), the full accent fill stays for the primary action; setting values
read in grey (VALUE); popups, the banner and the toast have a quiet grey edge
(EDGE), the toast is a dark pill; neutral greys the RGB565 panel keeps
neutral; the big clock graphite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-14 23:24:46 +02:00
co-authored by Claude Opus 5.5
parent 76e96f7eaa
commit 743500761a
7 changed files with 71 additions and 38 deletions
@@ -99,15 +99,15 @@ static void onPagesScrolled(lv_event_t* e) {
dotsSet(lv_obj_get_scroll_x(s_pages) > lv_obj_get_width(s_pages) / 2);
}
// A tile's look: on in the accent with dark text, off on the surface;
// A tile's look: on in SEL_BG / SEL_FG (Theme.h), off on the surface;
// `dim`: nothing to switch on this device.
static void tileSet(int t, const char* icon, const char* cap, bool on, bool dim = false) {
const uint32_t fg = on ? theme::ON_ACCENT : dim ? theme::TEXT_MUTED : theme::TEXT;
const uint32_t fg = on ? theme::SEL_FG : dim ? theme::TEXT_MUTED : theme::TEXT;
const uint8_t look = 1 | (on ? 2 : 0);
if (s_look[t] != look) { // LVGL restyles, and redraws, on every set (the refresh is each second)
s_look[t] = look;
lv_obj_set_style_bg_color(s_tile[t], lv_color_hex(on ? theme::ACCENT : theme::SURFACE), 0);
lv_obj_set_style_bg_color(s_tile[t], lv_color_hex(on ? theme::mix(theme::ACCENT, theme::BG, 75) : theme::SURFACE_2), LV_STATE_PRESSED);
lv_obj_set_style_bg_color(s_tile[t], lv_color_hex(on ? theme::SEL_BG : theme::SURFACE), 0);
lv_obj_set_style_bg_color(s_tile[t], lv_color_hex(on ? theme::SEL_PRESS : theme::SURFACE_2), LV_STATE_PRESSED);
}
setText(s_icon[t], icon);
setText(s_cap[t], cap);