summaryrefslogtreecommitdiffstats
path: root/widget/src/pick_list.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-09 06:35:33 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-10 10:01:49 +0100
commitd62bb8193c1c43f565fcc5c52293d564c91e215d (patch)
tree7f2d33d2f18a3dfb4e4e8e46b4e968523ca43bc6 /widget/src/pick_list.rs
parentd24e50c1a61eee7bca887224ad583eca60e14d32 (diff)
downloadiced-d62bb8193c1c43f565fcc5c52293d564c91e215d.tar.gz
iced-d62bb8193c1c43f565fcc5c52293d564c91e215d.tar.bz2
iced-d62bb8193c1c43f565fcc5c52293d564c91e215d.zip
Introduce useful helpers in `layout` module
Diffstat (limited to 'widget/src/pick_list.rs')
-rw-r--r--widget/src/pick_list.rs5
1 files changed, 3 insertions, 2 deletions
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)
};