toplevel_layout: Make size depend on axis

This commit is contained in:
Ian Douglas Scott 2025-02-06 13:45:22 -08:00
parent eb69aba7b2
commit 1342e37ad6

View file

@ -21,10 +21,15 @@ impl RowColToplevelLayout {
impl ToplevelLayout for RowColToplevelLayout { impl ToplevelLayout for RowColToplevelLayout {
fn size(&self) -> Size<Length> { fn size(&self) -> Size<Length> {
Size { match self.axis {
width: Length::Fill, Axis::Horizontal => Size {
// TODO Make depend on orientation or drop that option width: Length::Fill,
height: Length::Shrink, height: Length::Shrink,
},
Axis::Vertical => Size {
width: Length::Shrink,
height: Length::Fill,
},
} }
} }