mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-22 11:43:30 -05:00
A menu taller than the room under the menu bar scrolls inside an egui ScrollArea whose floating scrollbar is drawn over the rows' right edge, where the shortcut text ends. At 1.0x the 2-point handle grazes the last glyph; at 1.75x the bar is in its wide hovered state with a semi-opaque background and hides the last character of every shortcut, which reads as clipping. The scroll content, its clip and the rows are the level's width in both modes (instrumented), so nothing else needs to move: the scroll area hides its bar. The up/down strips, the wheel and dragging were already the designed ways to scroll a menu, like native menus; the native macOS menu bar does not go through this code. Test: tests_menubar::a_scrolled_menu_draws_no_scrollbar_over_its_shortcuts (a 700 pt and a 1400 pt window: no tall narrow rectangle along the level's right edge, equal widths), via a new HeadlessView::painted_shapes; fails on main with the bar's track [512, 59]-[514, 660] and handle.