From b0f72d8dad37fbcce570b43227bc5219a49d10cb Mon Sep 17 00:00:00 2001 From: David Mann Date: Thu, 26 Nov 2026 00:13:04 +0100 Subject: [PATCH] SectionList: only a framed list sets the columns' gap Co-Authored-By: Claude Opus 5.5 --- .../ui-patterns/src/patterns/form_dialogs/section_list.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/ui-patterns/src/patterns/form_dialogs/section_list.rs b/crates/ui-patterns/src/patterns/form_dialogs/section_list.rs index 2a2ecb0cf..40ac89688 100644 --- a/crates/ui-patterns/src/patterns/form_dialogs/section_list.rs +++ b/crates/ui-patterns/src/patterns/form_dialogs/section_list.rs @@ -76,8 +76,11 @@ impl<'a, K: Clone + Eq + Hash + Send + Sync + 'static> SectionList<'a, K> { let SectionList { label, source, shown, id, body_label, mut foot, framed } = self; let mut picked = None; // A framed list stands apart from the body; an unframed one has the divider between them. - let gap = if framed { Gap::Section } else { Gap::default() }; - Row::new().fill().gap(gap).show(ui, |ui, _| { + let mut columns = Row::new().fill(); + if framed { + columns = columns.gap(Gap::Section); + } + columns.show(ui, |ui, _| { let mut list = |ui: &mut Ui| { let mut sections = List::::new(label.clone()) .select(SelectMode::Single)