Skip to content

Commit 46aab24

Browse files
committed
Enable scroll selection for PickList only when scroll is discrete
1 parent 6069e90 commit 46aab24

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

native/src/widget/pick_list.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,11 @@ where
247247
event_status
248248
}
249249
}
250-
Event::Mouse(mouse::Event::WheelScrolled { delta })
251-
if layout.bounds().contains(cursor_position)
252-
&& !*self.is_open =>
250+
Event::Mouse(mouse::Event::WheelScrolled {
251+
delta: mouse::ScrollDelta::Lines { y, .. },
252+
}) if layout.bounds().contains(cursor_position)
253+
&& !*self.is_open =>
253254
{
254-
let y = match delta {
255-
mouse::ScrollDelta::Lines { y, .. }
256-
| mouse::ScrollDelta::Pixels { y, .. } => y,
257-
};
258-
259255
fn find_next<'a, T: PartialEq>(
260256
selected: &'a T,
261257
mut options: impl Iterator<Item = &'a T>,

0 commit comments

Comments
 (0)