Skip to content

Commit

Permalink
Fix mouse::Cursor fighting in stack widget
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Oct 4, 2024
1 parent d057b16 commit c217500
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions widget/src/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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,
);
Expand Down

0 comments on commit c217500

Please sign in to comment.