diff options
author | 2023-05-02 06:40:48 +0200 | |
---|---|---|
committer | 2023-05-02 06:40:48 +0200 | |
commit | 8e8808f0e187ed6671441f5016f07bfcba426452 (patch) | |
tree | bc4d2eeb57f60e654a4a8ed7c562f79ee507abab /widget/src/text_input.rs | |
parent | 2d7d9a130ece3fb6fa4cd52f9b32b4abd7887cf5 (diff) | |
parent | c8952ee4a1118fe67bfdf40fc77f3ff30f5d0278 (diff) | |
download | iced-8e8808f0e187ed6671441f5016f07bfcba426452.tar.gz iced-8e8808f0e187ed6671441f5016f07bfcba426452.tar.bz2 iced-8e8808f0e187ed6671441f5016f07bfcba426452.zip |
Merge branch 'master' into advanced-text
Diffstat (limited to 'widget/src/text_input.rs')
-rw-r--r-- | widget/src/text_input.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/widget/src/text_input.rs b/widget/src/text_input.rs index 32d0b1f8..364ec3cd 100644 --- a/widget/src/text_input.rs +++ b/widget/src/text_input.rs @@ -973,9 +973,12 @@ pub fn draw<Renderer>( size: icon.size.unwrap_or_else(|| renderer.default_size()), font: icon.font, color: appearance.icon_color, - bounds: icon_layout.bounds(), + bounds: Rectangle { + y: text_bounds.center_y(), + ..icon_layout.bounds() + }, horizontal_alignment: alignment::Horizontal::Left, - vertical_alignment: alignment::Vertical::Top, + vertical_alignment: alignment::Vertical::Center, shaping: text::Shaping::Advanced, }); } |