0024. The menu bar's menus fill the bar, and light as a hovered tab
Date: 2026-10-24
Status
Accepted. The user asked for a larger target on the title bar's menus, one you can see under the pointer. Filling the bar's full height is my reading of that, to match the tabs beside them; the colour it lights in is the user's choice, below.
Context
The title bar's menus (File, Edit, View, ADR-0006) were egui's menu-bar buttons: as high as the text, with 2 px padding either side and 8 px gaps between them, and lit in egui's small rounded hover fill. The tabs after them (ADR-0009) fill the bar's whole height and are square, the shown one in the panel colour, or the extreme background where the bar is already the panel colour. Next to the tabs the menus were small targets, and the gaps between them were dead space.
egui's MenuBar takes a style for its buttons, so the title bar can restyle the menu_buttons
apps already put in it. The menus inside the popups stay egui's (ADR-0023).
Decision
TitleBar::span(range), the bar's full height asTabStrip::spantakes it. With a menu bar, the left side spans it, and each menu is that tall. Withoutspanthey fill the 25 px row.- The menus have 10 px either side of their names and no gap between them, so the whole bar above and between the names opens a menu.
- The first menu's name stays where it was. The menus start 8 px further left, so the first menu's padding takes the bar's margin instead of pushing its name along. Its box reaches 4 px from the window's edge, so on a rounded window its lit fill takes the window's radius at the top-left (the shape is rounded after egui paints it), and stays inside the corner.
- The divider before the tabs stays the row's height, not the bar's, as long as before.
- Under the pointer or pressed, a menu is lit in the bar's hover colour, square, as a hovered tab is in Patina's tab strip, Teleprinter and the Patina bar. The shown tab's colour is left to mean the shown tab. A first version lit menus in the shown tab's colour, as first asked; next to tabs lit in the hover colour the bar disagreed with itself, and the user chose to follow Teleprinter and the Patina bar.
Consequences
- Apps with tabs already have the span and add
.span(span)to theirTitleBar. Apps without tabs get menus the row's height until they pass it too. - The left slot is laid out
spanhigh, so anything else an app puts there is centred on the bar as before. - A menu is lit only while hovered or pressed; once open, egui doesn't light its button, so
moving into the menu leaves its name unlit. Lighting the open one needs the button's id, which
only the app has from
menu_button's response.
Revisit when
- egui lights a menu bar's open menu, or lets the bar find its menus' buttons.