feat: respect accent colors in more places in desktop

This commit is contained in:
2026-05-24 21:29:59 +02:00
parent c731f718e9
commit 96943116f8
12 changed files with 70 additions and 20 deletions
@@ -8,6 +8,10 @@
namespace filemanager {
static Color selection_highlight(const DesktopState* ds) {
return gui::mtk::accent_hover_tint(ds ? ds->settings.accent_color : colors::ACCENT);
}
static bool label_break_char(char ch) {
return ch == ' ' || ch == '-' || ch == '_' || ch == '/';
}
@@ -308,7 +312,7 @@ void filemanager_on_draw(Window* win, Framebuffer& fb) {
int sh = gui_min(cell_y + row_h, c.h) - sy;
int sw = gui_min(FM_GRID_CELL_W, c.w - FM_SCROLLBAR_W - cell_x);
if (sh > 0 && sw > 0)
c.fill_rect(cell_x, sy, sw, sh, colors::MENU_HOVER);
c.fill_rect(cell_x, sy, sw, sh, selection_highlight(ds));
}
// Large icon centered horizontally
@@ -441,7 +445,7 @@ void filemanager_on_draw(Window* win, Framebuffer& fb) {
int sy = gui_max(iy, list_y);
int sh = gui_min(iy + FM_ITEM_H, c.h) - sy;
if (sh > 0)
c.fill_rect(0, sy, c.w - FM_SCROLLBAR_W, sh, colors::MENU_HOVER);
c.fill_rect(0, sy, c.w - FM_SCROLLBAR_W, sh, selection_highlight(fm->desktop));
}
// Icon (skip if it would bleed above the list area)
@@ -582,7 +586,7 @@ void filemanager_on_draw(Window* win, Framebuffer& fb) {
// ---- Context menu overlay ----
if (fm->ctx_open && fm->ctx_item_count > 0) {
mtk::Theme theme = mtk::make_theme(colors::ACCENT);
mtk::Theme theme = mtk::make_theme(fm->desktop ? fm->desktop->settings.accent_color : colors::ACCENT);
theme.border = colors::BORDER;
theme.text = colors::TEXT_COLOR;