diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index 1ce4cf0..9a2aba5 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -9363,12 +9363,21 @@ static void wl_menu_paint_entry(WMenu *menu, int index, int selected) uint32_t *dst = (uint32_t *)pixman_image_get_data(fb->image); int stride = pixman_image_get_stride(fb->image) / 4; - /* Background color */ + /* Background color from appearance preferences */ uint32_t bg; if (selected) { - bg = 0xFF4A6984; + WMColor *sc = scr->select_color; + bg = 0xFF000000 | ((uint32_t)WMRedComponentOfColor(sc) >> 8 << 16) + | ((uint32_t)WMGreenComponentOfColor(sc) >> 8 << 8) + | ((uint32_t)WMBlueComponentOfColor(sc) >> 8); } else { - bg = 0xFFAEAAAE; + WTexSolid *ts = (WTexSolid *)scr->menu_item_texture; + if (ts) + bg = 0xFF000000 | ((uint32_t)ts->normal.red >> 8 << 16) + | ((uint32_t)ts->normal.green >> 8 << 8) + | ((uint32_t)ts->normal.blue >> 8); + else + bg = 0xFFAEAAAE; } for (int row = y; row < y + h && row < fb->height; row++) @@ -9396,9 +9405,21 @@ static void wl_menu_paint_entry(WMenu *menu, int index, int selected) /* Draw cascade arrow for submenus (3D right-pointing triangle matching X11) */ if (entry->cascade >= 0) { + WTexSolid *aux = (WTexSolid *)scr->menu_item_texture; uint32_t dim_c = 0xFF606060; uint32_t light_c = 0xFFE0E0E0; uint32_t dark_c = 0xFF303030; + if (aux) { + dim_c = 0xFF000000 | ((uint32_t)aux->dim.red >> 8 << 16) + | ((uint32_t)aux->dim.green >> 8 << 8) + | ((uint32_t)aux->dim.blue >> 8); + light_c = 0xFF000000 | ((uint32_t)aux->light.red >> 8 << 16) + | ((uint32_t)aux->light.green >> 8 << 8) + | ((uint32_t)aux->light.blue >> 8); + dark_c = 0xFF000000 | ((uint32_t)aux->dark.red >> 8 << 16) + | ((uint32_t)aux->dark.green >> 8 << 8) + | ((uint32_t)aux->dark.blue >> 8); + } /* Top edge: dim line from (w-11, y+6) to (w-6, y+h/2-1) */ int x0 = w - 11, y0 = y + 6, x1 = w - 6, y1 = y + h / 2 - 1; for (int i = 0; i <= 5; i++) {