mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 10:51:57 +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:
@@ -68,14 +68,14 @@ static void onCalendarDraw(lv_event_t* e) {
|
||||
}
|
||||
snprintf(buf, sizeof(buf), "%d", day);
|
||||
td.text = buf;
|
||||
td.color = lv_color_hex(today ? theme::BG : k % 7 >= 5 ? theme::TEXT_MUTED : theme::TEXT);
|
||||
td.color = lv_color_hex(today ? theme::ON_ACCENT : k % 7 >= 5 ? theme::TEXT_MUTED : theme::TEXT);
|
||||
lv_area_t la = { cx, cy + (ch - fh) / 2, cx + cw - 1, cy + (ch + fh) / 2 };
|
||||
lv_draw_label(layer, &td, &la);
|
||||
if (s_cal_marks & (1UL << (day - 1))) { // under the number
|
||||
lv_draw_rect_dsc_t md;
|
||||
lv_draw_rect_dsc_init(&md);
|
||||
md.radius = 1;
|
||||
md.bg_color = lv_color_hex(today ? theme::BG : theme::ACCENT);
|
||||
md.bg_color = lv_color_hex(today ? theme::ON_ACCENT : theme::ACCENT);
|
||||
lv_area_t ma = { cx + cw / 2 - 6, cy + ch - 2, cx + cw / 2 + 6, cy + ch - 1 };
|
||||
lv_draw_rect(layer, &md, &ma);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user