diff options
author | 2023-02-14 11:40:29 -0800 | |
---|---|---|
committer | 2023-02-14 11:40:29 -0800 | |
commit | a9992d131b8cbbc2c73854ecf073ca28c35397e6 (patch) | |
tree | a25b0ed943b1deaf756e1332a5d3abe6ccdd3719 /native/src/widget | |
parent | 8c5996c12be5489db0d0f6b0c843965c47ff3a26 (diff) | |
download | iced-a9992d131b8cbbc2c73854ecf073ca28c35397e6.tar.gz iced-a9992d131b8cbbc2c73854ecf073ca28c35397e6.tar.bz2 iced-a9992d131b8cbbc2c73854ecf073ca28c35397e6.zip |
Pad after setting width
Otherwise `width` will set limits back to a fixed width if
`Length::Units` is used, overwriting padding.
Diffstat (limited to 'native/src/widget')
-rw-r--r-- | native/src/widget/text_input.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs index 8755b85d..5bfc918c 100644 --- a/native/src/widget/text_input.rs +++ b/native/src/widget/text_input.rs @@ -389,8 +389,8 @@ where let padding = padding.fit(Size::ZERO, limits.max()); let limits = limits - .pad(padding) .width(width) + .pad(padding) .height(Length::Units(text_size)); let mut text = layout::Node::new(limits.resolve(Size::ZERO)); |