diff options
author | 2024-10-04 17:33:38 +0200 | |
---|---|---|
committer | 2024-10-04 17:33:38 +0200 | |
commit | c217500a5abd1fbfc1e598fb98dadd3ee85d8a51 (patch) | |
tree | 7c839a41b3afe1d572f5b5734d8c3b3515f05ae4 | |
parent | d057b16153c6772b80a296a8c17fb67da51eb07f (diff) | |
download | iced-c217500a5abd1fbfc1e598fb98dadd3ee85d8a51.tar.gz iced-c217500a5abd1fbfc1e598fb98dadd3ee85d8a51.tar.bz2 iced-c217500a5abd1fbfc1e598fb98dadd3ee85d8a51.zip |
Fix `mouse::Cursor` fighting in `stack` widget
-rw-r--r-- | widget/src/stack.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/widget/src/stack.rs b/widget/src/stack.rs index 9ccaa274..6a44c328 100644 --- a/widget/src/stack.rs +++ b/widget/src/stack.rs @@ -215,9 +215,7 @@ where shell: &mut Shell<'_, Message>, viewport: &Rectangle, ) -> event::Status { - let is_over_scroll = - matches!(event, Event::Mouse(mouse::Event::WheelScrolled { .. })) - && cursor.is_over(layout.bounds()); + let is_over = cursor.is_over(layout.bounds()); self.children .iter_mut() @@ -236,7 +234,7 @@ where viewport, ); - if is_over_scroll && cursor != mouse::Cursor::Unavailable { + if is_over && cursor != mouse::Cursor::Unavailable { let interaction = child.as_widget().mouse_interaction( state, layout, cursor, viewport, renderer, ); |