From 0eef719c72ee0a8d2c826c558ab1d66fd2282b18 Mon Sep 17 00:00:00 2001 From: Martin Ball Date: Fri, 20 Nov 2026 02:46:12 +0000 Subject: [PATCH] Ribbon look: group columns a tight gap apart, so View fits with Zoom labelled as the old ribbon Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FypgCZhHKRuRB5wZUiw6BE --- crates/menu/src/ribbon/group.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/menu/src/ribbon/group.rs b/crates/menu/src/ribbon/group.rs index d009cd648..364ea4a69 100644 --- a/crates/menu/src/ribbon/group.rs +++ b/crates/menu/src/ribbon/group.rs @@ -81,7 +81,10 @@ impl<'a> RibbonGroup<'a> { let mut took_width = f32::NAN; let mut title = Rect::NOTHING; let shown = Stack::new().gap(Gap::None).show(ui, |ui, _| { - let content = Row::new().show(ui, |ui, _| add(ui)).output.rect; + // A look that sets the row height (`RibbonLook::row`) packs its columns as close as its rows: a tight gap + // apart, as the old ribbon packed them. + let columns = if room.icons.row > 0 { Gap::Tight } else { Gap::Row }; + let content = Row::new().gap(columns).show(ui, |ui, _| add(ui)).output.rect; took = content.height(); took_width = content.width(); // Every group places this spacer, an empty one too, so each has the same gaps above its title.