summaryrefslogtreecommitdiffstats
path: root/core/src/layout
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/layout')
-rw-r--r--core/src/layout/flex.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/src/layout/flex.rs b/core/src/layout/flex.rs
index 5ae98b8c..9a4b2cbf 100644
--- a/core/src/layout/flex.rs
+++ b/core/src/layout/flex.rs
@@ -123,11 +123,11 @@ where
let max_cross = match axis {
Axis::Horizontal => match height {
- Length::Shrink => cross,
+ Length::Shrink if cross > 0.0 => cross,
_ => max_cross,
},
Axis::Vertical => match width {
- Length::Shrink => cross,
+ Length::Shrink if cross > 0.0 => cross,
_ => max_cross,
},
};
@@ -154,8 +154,7 @@ where
let (min_width, min_height) =
axis.pack(min_main, axis.cross(limits.min()));
- let (max_width, max_height) = axis
- .pack(max_main, max_cross * fill_cross_factor.max(1) as f32);
+ let (max_width, max_height) = axis.pack(max_main, max_cross);
let child_limits = Limits::new(
Size::new(min_width, min_height),