Fix: menu lists can overflow the rendered window - #155
Conversation
Cap popup/submenu window height to the display and let ui::Menu hide items outside the visible window, showing combobox_arrow_up/down skin parts as scroll indicators (clickable, mouse-wheel and keyboard navigation all scroll). Also replace the hand-drawn submenu triangle with the combobox_arrow_right skin parts. Fixes #138 Co-authored-by: Daniel Praźmo <4753308+Nidrax@users.noreply.github.com>
|
Scrolling doesn't work as intended. While it is possible to use touchpad/mouse wheel to scroll the menus, it is very clunky (doesn't always work, looks like an 'active' menu item has to be hovered on for the scrolling to work). Instead when the menu overflows the rendered view I wanted to display a fixed "scroller" items on with upward/downward arrows that would autoscroll the menu items list while mouse is hovered over them. Also implement bounds checking to not let the user scroll further beyond the point than when the last item on the list is in view. |
|
Claude finished @Nidrax's task in 15m 41s —— View job Done
What was wrong: the old implementation only scrolled on What changed (
Verified Branch: |
Replace click/wheel-based menu scrolling, which relied on the mouse having already moved over the popup to register, with a Timer-driven auto-scroll that starts as soon as the cursor hovers a scroll arrow and keeps scrolling until it leaves or the end of the list is reached. Also fixes scrollBy() so wheel/timer scrolling can't advance past the point where the last (or first) item is fully in view. Co-authored-by: Daniel Praźmo <4753308+Nidrax@users.noreply.github.com>
Make overflowing menus scroll instead of running off-screen:
ui::Menunow hides items that don't fit and shows scroll indicators (using thecombobox_arrow_up_selected/combobox_arrow_down_selectedskin parts) when it needs to scroll. Scrolling works via clicking the arrows, the mouse wheel, or keyboard up/down navigation.combobox_arrow_rightskin parts.Generated with Claude Code
Fixes #138