fix(statusbar): keep pills right-aligned

Reuse free space on the final wrapped layout-tab row before adding another status-bar row.

Closes #527
This commit is contained in:
Hakan Seven committed 2026-07-27 21:33:25 +03:00
1 parent b8889ccd20
commit ebed0e6e62
2 files changed
+94 -21

No files matched your search

+6 -3
View File
@@ -363,12 +363,15 @@ impl StatusBar {
)
.into(),
);
let right_status = WrapFlow::new(pills).spacing_x(2.0).row_h(30.0);
let right_status = WrapFlow::new(pills)
.spacing_x(2.0)
.row_h(30.0)
.justify_end(true);
// Left area: hamburger menu + Model/layout tabs in a flex-wrap flow, so
// they spill onto lower rows when narrow (no scroll arrows). The pills
// wrap in their own flow; WrapBar stacks the two areas so a wrapped tab
// never shares a row with a pill.
// use the remaining space on the final tab row when they fit; otherwise
// WrapBar adds another right-aligned row.
let mut left: Vec<Element<'_, Message>> = Vec::new();
left.push(PosReport::new(SB_LAYOUTLIST_ID, menu_btn).into());
if show_layout_tabs {