From 1342e37ad6aa41fb08ba5cec7a5f67e46a310880 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Thu, 6 Feb 2025 13:45:22 -0800 Subject: [PATCH] toplevel_layout: Make size depend on axis --- .../toplevel_layout/row_col_toplevel_layout.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/widgets/toplevels/toplevel_layout/row_col_toplevel_layout.rs b/src/widgets/toplevels/toplevel_layout/row_col_toplevel_layout.rs index e3e116c..ee51f53 100644 --- a/src/widgets/toplevels/toplevel_layout/row_col_toplevel_layout.rs +++ b/src/widgets/toplevels/toplevel_layout/row_col_toplevel_layout.rs @@ -21,10 +21,15 @@ impl RowColToplevelLayout { impl ToplevelLayout for RowColToplevelLayout { fn size(&self) -> Size { - 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, + }, } }