diff options
author | 2024-01-11 06:12:19 +0100 | |
---|---|---|
committer | 2024-01-11 06:12:19 +0100 | |
commit | 03c901d49b7cce901cfd76100f08dcff31420af8 (patch) | |
tree | f19e1708f3687edf20429dd493ab27d44a008305 /widget/src/container.rs | |
parent | fa53d9adbb0efbbe806a749476f83c04f756be75 (diff) | |
download | iced-03c901d49b7cce901cfd76100f08dcff31420af8.tar.gz iced-03c901d49b7cce901cfd76100f08dcff31420af8.tar.bz2 iced-03c901d49b7cce901cfd76100f08dcff31420af8.zip |
Make `Button` sizing strategy adaptive
Diffstat (limited to 'widget/src/container.rs')
-rw-r--r-- | widget/src/container.rs | 12 |
1 files changed, 2 insertions, 10 deletions
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, |