Cross-posted from the GitHub issue (RenkuOS/Source#274):
BeOS 5.1 "Dano" had a hidden menu option called ZSnake (Menu preferences, shown when the panel was opened with Ctrl+Alt+Shift held). With it on, the selection in a chain of open menus becomes one path: the item a submenu opened from, a band down the submenu's edge, and the submenu's selected item, with a step for each level. I'd like to add it to Renku as an option, off by default.
Hokku (the Haiku API on Linux) has a clean-room implementation of it, matched pixel for pixel against screenshots of Dano: https://github.com/idumych/hokku (src/kits/interface/Menu.cpp, MenuWindow.cpp, MenuItem.cpp; commits 0151489, 65e2741, 78b946c, 6a3b787).
What it looks like
- Selected items get an outlined highlight: the selection colour inside a 1 px outline in the selected-border colour, corner pixels left out, a light line under it.
- The band runs outside the submenu, over the parent menu's edge: an outline, 3 px of the selection colour, and the submenu's own border as its other outline. Below the parent menu it runs over whatever is underneath.
- Every corner where the path turns is cut on a 3-pixel diagonal.
- A menu opened beside its menu bar title (the Deskbar's menu) gets one too, starting at the button, which takes the selection colour while the menu is open.
- Submenus keep opening to the side their parent opened to, so the path steps one way, and they slide rather than flip to fit, staying level with their item.
- Nothing until a submenu has a selection; no animation.
The question for Renku: where the band is drawn
The band lies outside the submenu, partly over the parent menu and partly over the desktop, so it can't be drawn inside either menu's window as they are.
A. Dano-exact. Each submenu's window gets a strip (8 px in Hokku) beside the menu that is transparent and passes the pointer through, except where the band is. Hokku does this on Wayland with a transparent window area and an input region. Renku's app_server has no shaped or partly transparent windows, so this needs a new app_server feature first. A possible split:
- app_server and Interface Kit: a window shape (a region that limits a window's drawing and pointer input), private API to begin with.
- Interface Kit: ZSnake in BMenu, BMenuItem and BMenuWindow using it, behind a desktop setting.
- Appearance: the switch. Deskbar: the button's selection colour.
B. Band inside the submenu. Interface Kit only: the same highlights and corners, but the band is drawn along the submenu's own edge, so a few pixels of the submenu show where Dano shows the menu beside it. One small PR plus the Appearance switch. It isn't identical to Dano, but needs no app_server change. This is Hokku's fallback on X11.
Either way the setting would live in the desktop settings (beside the menu settings) and default to off.
Which would Renku want, or is there a better place for this than app_server window shapes (e.g. drawing the band in app_server itself, as the menus' windows are server-side anyway)? I can do the work and the testing once there's a preferred design.