summaryrefslogtreecommitdiffstats
path: root/widget/src/text_input.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/text_input.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/text_input.rs')
-rw-r--r--widget/src/text_input.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/widget/src/text_input.rs b/widget/src/text_input.rs
index 7e91105c..d8540658 100644
--- a/widget/src/text_input.rs
+++ b/widget/src/text_input.rs
@@ -508,8 +508,8 @@ where
let padding = padding.fit(Size::ZERO, limits.max());
let height = line_height.to_absolute(text_size);
- let limits = limits.width(width).shrink(padding).height(height);
- let text_bounds = limits.resolve(Size::ZERO, width, height);
+ let limits = limits.width(width).shrink(padding);
+ let text_bounds = limits.resolve(width, height, Size::ZERO);
let placeholder_text = Text {
font,