Expand description
MenuBarStrip — full-width top-of-window strip that auto-sizes its
height to the wrapped child’s natural height.
Most apps put a menu bar at the top of the window inside a small container that paints a chrome background, draws a 1-px separator between the bar and the rest of the UI, and lets the bar scroll horizontally if its content overflows a narrow viewport. Before this widget existed every app reinvented that container with a hard-coded height, which left a visible chrome stripe below the menu bar whenever the constants drifted (or the bar shrank from a redesign).
MenuBarStrip removes the foot-gun: it queries the child for its
natural height during layout and reports exactly that height back
up the tree. Drop it inside a FlexColumn with a wrapped MenuBar
(or any other top-bar widget) and the strip claims the right number
of pixels with no per-app tuning.
Provides:
- Full-width
top_bar_bgfill behind the wrapped child. - 1-px bottom separator line matching the
Separatorwidget tone. - Horizontal overflow scroll (wheel + middle-button drag) when the child’s natural width exceeds the available width.