mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 19:02:00 +00:00
feat(l2): light theme
Settings > Display > Theme: Dark / Light (NVS mc_ui/light). The colour tokens are set once before anything is built, so a change restarts the device. Text on an accent fill is the new ON_ACCENT (it was BG, white in the light theme); each accent has a deeper hand-picked light variant that reads on white and takes white text. The map's empty-tile fill and grid and the areas' outlines follow the theme too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -102,7 +102,7 @@ static void onPagesScrolled(lv_event_t* e) {
|
||||
// A tile's look: on in the accent with dark text, 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::BG : dim ? theme::TEXT_MUTED : theme::TEXT;
|
||||
const uint32_t fg = on ? theme::ON_ACCENT : 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;
|
||||
|
||||
Reference in New Issue
Block a user