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 {
|
||||
fn size(&self) -> Size<Length> {
|
||||
Size {
|
||||
width: Length::Fill,
|
||||
// TODO Make depend on orientation or drop that option
|
||||
height: Length::Shrink,
|
||||
match self.axis {
|
||||
Axis::Horizontal => Size {
|
||||
width: Length::Fill,
|
||||
height: Length::Shrink,
|
||||
},
|
||||
Axis::Vertical => Size {
|
||||
width: Length::Shrink,
|
||||
height: Length::Fill,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue