toplevel_layout: Make size depend on axis
This commit is contained in:
parent
eb69aba7b2
commit
1342e37ad6
1 changed files with 9 additions and 4 deletions
|
|
@ -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,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue