mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 23:00:04 -04:00
Default to stretch
This commit is contained in:
@@ -536,14 +536,9 @@ impl<'atom> SizedAtomLayout<'atom> {
|
|||||||
}
|
}
|
||||||
SizedAtomKind::Empty { .. } => {}
|
SizedAtomKind::Empty { .. } => {}
|
||||||
SizedAtomKind::Layout(layout) => {
|
SizedAtomKind::Layout(layout) => {
|
||||||
// Hand the nested layout the full (possibly grown) cell width so its own
|
// TODO(lucasmerlin): Add some kind of justify flag to AtomLayout
|
||||||
// `grow` atoms can expand, while keeping its measured height and honoring
|
let layout_response = ui.interact(frame, layout.id, layout.sense);
|
||||||
// this atom's vertical alignment within the row.
|
layout.paint_at(ui, frame, layout_response);
|
||||||
let layout_rect = sized
|
|
||||||
.align
|
|
||||||
.align_size_within_rect(Vec2::new(frame.width(), size.y), frame);
|
|
||||||
let layout_response = ui.interact(layout_rect, layout.id, layout.sense);
|
|
||||||
layout.paint_at(ui, layout_rect, layout_response);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user