diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index 6699f5e..1ce4cf0 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -9394,13 +9394,33 @@ static void wl_menu_paint_entry(WMenu *menu, int index, int selected) w - 8 - tw, text_y, entry->rtext, strlen(entry->rtext)); } - /* Draw cascade arrow for submenus (right-pointing triangle) */ + /* Draw cascade arrow for submenus (3D right-pointing triangle matching X11) */ if (entry->cascade >= 0) { - int ay = y + h / 2; - for (int i = 0; i < 5; i++) - for (int j = -(4 - i); j <= (4 - i); j++) - if (w - 12 + i < w && ay + j >= 0 && ay + j < fb->height) - dst[(ay + j) * stride + (w - 12 + i)] = selected ? 0xFFFFFFFF : 0xFF000000; + uint32_t dim_c = 0xFF606060; + uint32_t light_c = 0xFFE0E0E0; + uint32_t dark_c = 0xFF303030; + /* 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++) { + int lx = x0 + i * (x1 - x0) / 5; + int ly = y0 + i * (y1 - y0) / 5; + if (lx >= 0 && lx < (int)fb->width && ly >= 0 && ly < fb->height) + dst[ly * stride + lx] = dim_c; + } + /* Bottom edge: light line from (w-11, y+h-8) to (w-6, y+h/2-1) */ + y0 = y + h - 8; + for (int i = 0; i <= 5; i++) { + int lx = x0 + i * (x1 - x0) / 5; + int ly = y0 + i * (y1 - y0) / 5; + if (lx >= 0 && lx < (int)fb->width && ly >= 0 && ly < fb->height) + dst[ly * stride + lx] = light_c; + } + /* Left edge: dark vertical line at w-12 from y+6 to y+h-8 */ + int lx = w - 12; + if (lx >= 0 && lx < (int)fb->width) + for (int ly = y + 6; ly <= y + h - 8 && ly < fb->height; ly++) + if (ly >= 0) + dst[ly * stride + lx] = dark_c; } /* Bevel lines (separators between entries) */