diff options
author | 2023-02-01 04:14:11 +0100 | |
---|---|---|
committer | 2023-02-24 13:22:56 +0100 | |
commit | 032e860f13a562719faf128238abe7ffb7f2a610 (patch) | |
tree | cfc67c1a0887451b06ec4c83781c469dfd08cc9d /native | |
parent | bb27982009d89a1cf4874697f7c17ff0af71d93d (diff) | |
download | iced-032e860f13a562719faf128238abe7ffb7f2a610.tar.gz iced-032e860f13a562719faf128238abe7ffb7f2a610.tar.bz2 iced-032e860f13a562719faf128238abe7ffb7f2a610.zip |
Fix `PickList` line height
Diffstat (limited to 'native')
-rw-r--r-- | native/src/widget/pick_list.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/native/src/widget/pick_list.rs b/native/src/widget/pick_list.rs index 17528db4..a128d1ae 100644 --- a/native/src/widget/pick_list.rs +++ b/native/src/widget/pick_list.rs @@ -384,7 +384,7 @@ where let size = { let intrinsic = - Size::new(max_width + text_size + padding.left, text_size); + Size::new(max_width + text_size + padding.left, text_size * 1.2); limits.resolve(intrinsic).pad(padding) }; @@ -620,12 +620,12 @@ pub fn draw<'a, T, Renderer>( color: style.handle_color, bounds: Rectangle { x: bounds.x + bounds.width - padding.horizontal(), - y: bounds.center_y() - size / 2.0, - height: size, + y: bounds.center_y(), + height: size * 1.2, ..bounds }, horizontal_alignment: alignment::Horizontal::Right, - vertical_alignment: alignment::Vertical::Top, + vertical_alignment: alignment::Vertical::Center, }); } @@ -645,12 +645,12 @@ pub fn draw<'a, T, Renderer>( }, bounds: Rectangle { x: bounds.x + padding.left, - y: bounds.center_y() - text_size / 2.0, + y: bounds.center_y(), width: bounds.width - padding.horizontal(), - height: text_size, + height: text_size * 1.2, }, horizontal_alignment: alignment::Horizontal::Left, - vertical_alignment: alignment::Vertical::Top, + vertical_alignment: alignment::Vertical::Center, }); } } |