feat(statusbar): scrollable layout tabs + layout-list dropdown (#199)

Keep the right-side status-bar tools from being pushed off the bar when a
drawing has many layouts: the layout tabs now live in a horizontal scrollable
that only takes the space left between the menu and the tools, with ‹ › arrows
(and the mouse wheel) to scroll them.

Repurpose the leftmost hamburger — which previously fired a no-op MENU command
— to open a dropdown listing Model and every layout (scrollable, current
highlighted); picking one switches to it, an outside click dismisses it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-06-27 14:24:47 +03:00
commit 3def2f2034
5 changed files with 173 additions and 9 deletions

View file

@ -1222,6 +1222,15 @@ impl OpenCADStudio {
iced::widget::Space::new().width(0).height(0).into()
};
let layout_list_layer: Element<'_, Message> = if self.layout_list_open && !tab.is_start {
crate::ui::statusbar::statusbar_menu::layout_list_overlay(
&tab.scene.layout_names(),
&tab.scene.current_layout,
)
} else {
iced::widget::Space::new().width(0).height(0).into()
};
let units_layer: Element<'_, Message> = if self.units_popup_open {
crate::ui::popup::units_popup::units_popup_overlay(tab.scene.document.header.insertion_units)
} else {
@ -1286,6 +1295,7 @@ impl OpenCADStudio {
snap_layer,
scale_layer,
statusbar_menu_layer,
layout_list_layer,
units_layer,
isolate_layer,
sel_filter_layer,