From 0655a20ad119e2e9790afcc45039fd4ac0e7d432 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 16 Mar 2023 20:23:25 +0100 Subject: Make `Shrink` have priority over `Fill` in layout --- widget/src/column.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'widget/src/column.rs') diff --git a/widget/src/column.rs b/widget/src/column.rs index abb522be..526509bb 100644 --- a/widget/src/column.rs +++ b/widget/src/column.rs @@ -35,7 +35,7 @@ impl<'a, Message, Renderer> Column<'a, Message, Renderer> { Column { spacing: 0.0, padding: Padding::ZERO, - width: Length::Shrink, + width: Length::Fill, height: Length::Shrink, max_width: f32::INFINITY, align_items: Alignment::Start, @@ -126,15 +126,14 @@ where renderer: &Renderer, limits: &layout::Limits, ) -> layout::Node { - let limits = limits - .max_width(self.max_width) - .width(self.width) - .height(self.height); + let limits = limits.max_width(self.max_width); layout::flex::resolve( layout::flex::Axis::Vertical, renderer, &limits, + self.width, + self.height, self.padding, self.spacing, self.align_items, -- cgit