From d62bb8193c1c43f565fcc5c52293d564c91e215d Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 9 Jan 2024 06:35:33 +0100 Subject: Introduce useful helpers in `layout` module --- widget/src/pick_list.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'widget/src/pick_list.rs') diff --git a/widget/src/pick_list.rs b/widget/src/pick_list.rs index d83b0624..2576a1e8 100644 --- a/widget/src/pick_list.rs +++ b/widget/src/pick_list.rs @@ -392,7 +392,6 @@ where { use std::f32; - let limits = limits.width(width).height(Length::Shrink); let font = font.unwrap_or_else(|| renderer.default_font()); let text_size = text_size.unwrap_or_else(|| renderer.default_size()); @@ -451,8 +450,10 @@ where ); limits + .width(width) + .height(Length::Shrink) .shrink(padding) - .resolve(intrinsic, width, Length::Shrink) + .resolve(width, Length::Shrink, intrinsic) .expand(padding) }; -- cgit