mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 10:51:57 +00:00
style(ui-lvgl): selected / on in the full accent, no ACCENT_DIM
ACCENT_DIM (the accent mixed toward black) came out brown on selected tabs, chips, segments and own bubbles. They take the accent with dark text now, as primary actions and the quick panel tiles do: styleSelected() sets the fill, the pressed shade and every label under it. Own bubbles: dark text, age and delivery mark (green or red can't be read on amber); the melody editor's selected note is outlined, the sounding one filled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -33,12 +33,14 @@ static const char* OCTAVES[] = { "4", "5", "6", "" };
|
||||
static const char* DURS[] = { "1/4", "1/8", "1/16", "1/32", "" };
|
||||
static const char* SLOTS[] = { "Melody 1", "Melody 2", "" };
|
||||
|
||||
// Selected: dim accent with a border; sounding now (Play): full accent.
|
||||
// Selected: an accent border; sounding now (Play): the accent, dark text.
|
||||
static void styleCell(int i, bool sel) {
|
||||
if (i < 0 || i >= soundctl::MAX_NOTES || !s_cells[i]) return;
|
||||
uint32_t bg = i == s_hl ? theme::ACCENT : sel ? theme::ACCENT_DIM : theme::SURFACE;
|
||||
lv_obj_set_style_bg_color(s_cells[i], lv_color_hex(bg), 0);
|
||||
const bool hl = i == s_hl;
|
||||
lv_obj_set_style_bg_color(s_cells[i], lv_color_hex(hl ? theme::ACCENT : theme::SURFACE), 0);
|
||||
lv_obj_set_style_border_width(s_cells[i], sel ? 2 : 0, 0);
|
||||
setTextColor(lv_obj_get_child(s_cells[i], 0), hl ? theme::BG : theme::TEXT);
|
||||
setTextColor(lv_obj_get_child(s_cells[i], 1), hl ? theme::BG : theme::TEXT_MUTED);
|
||||
}
|
||||
|
||||
// Moves the "sounding" light to note `idx` (-1: none).
|
||||
|
||||
Reference in New Issue
Block a user