Skip to content

Commit

Permalink
Restrict text width & height to prevent overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tarkah committed Apr 27, 2022
1 parent bc8b4bb commit d562c27
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion native/src/widget/pick_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,8 @@ pub fn draw<T, Renderer>(
bounds: Rectangle {
x: bounds.x + f32::from(padding.left),
y: bounds.center_y() - text_size / 2.0,
..bounds
width: bounds.width - f32::from(padding.horizontal()),
height: text_size,
},
horizontal_alignment: alignment::Horizontal::Left,
vertical_alignment: alignment::Vertical::Top,
Expand Down

0 comments on commit d562c27

Please sign in to comment.