From 03c901d49b7cce901cfd76100f08dcff31420af8 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 11 Jan 2024 06:12:19 +0100 Subject: Make `Button` sizing strategy adaptive --- widget/src/container.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'widget/src/container.rs') diff --git a/widget/src/container.rs b/widget/src/container.rs index ecc5c651..cffb0458 100644 --- a/widget/src/container.rs +++ b/widget/src/container.rs @@ -52,16 +52,8 @@ where Container { id: None, padding: Padding::ZERO, - width: if size.width.is_fill() { - Length::Fill - } else { - Length::Shrink - }, - height: if size.height.is_fill() { - Length::Fill - } else { - Length::Shrink - }, + width: size.width.fluid(), + height: size.height.fluid(), max_width: f32::INFINITY, max_height: f32::INFINITY, horizontal_alignment: alignment::Horizontal::Left, -- cgit