From d562c27e8ce10ecf4aed4d5fc4c64a737391c2c9 Mon Sep 17 00:00:00 2001 From: Cory Forsstrom Date: Wed, 27 Apr 2022 09:13:11 -0700 Subject: Restrict text width & height to prevent overflow --- native/src/widget/pick_list.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'native/src/widget') diff --git a/native/src/widget/pick_list.rs b/native/src/widget/pick_list.rs index 2e61e036..0374aef7 100644 --- a/native/src/widget/pick_list.rs +++ b/native/src/widget/pick_list.rs @@ -414,7 +414,8 @@ pub fn draw( 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, -- cgit