mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 04:27:49 +00:00
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FypgCZhHKRuRB5wZUiw6BE
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ed5b2b06b5
commit
0eef719c72
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user