mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 09:08:11 +00:00
SectionList: only a framed list sets the columns' gap
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f74fe090fc
commit
b0f72d8dad
@@ -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::<K>::new(label.clone())
|
||||
.select(SelectMode::Single)
|
||||
|
||||
Reference in New Issue
Block a user