Fix mouse::Cursor fighting in stack widget
This commit is contained in:
parent
d057b16153
commit
c217500a5a
1 changed files with 2 additions and 4 deletions
|
|
@ -215,9 +215,7 @@ where
|
||||||
shell: &mut Shell<'_, Message>,
|
shell: &mut Shell<'_, Message>,
|
||||||
viewport: &Rectangle,
|
viewport: &Rectangle,
|
||||||
) -> event::Status {
|
) -> event::Status {
|
||||||
let is_over_scroll =
|
let is_over = cursor.is_over(layout.bounds());
|
||||||
matches!(event, Event::Mouse(mouse::Event::WheelScrolled { .. }))
|
|
||||||
&& cursor.is_over(layout.bounds());
|
|
||||||
|
|
||||||
self.children
|
self.children
|
||||||
.iter_mut()
|
.iter_mut()
|
||||||
|
|
@ -236,7 +234,7 @@ where
|
||||||
viewport,
|
viewport,
|
||||||
);
|
);
|
||||||
|
|
||||||
if is_over_scroll && cursor != mouse::Cursor::Unavailable {
|
if is_over && cursor != mouse::Cursor::Unavailable {
|
||||||
let interaction = child.as_widget().mouse_interaction(
|
let interaction = child.as_widget().mouse_interaction(
|
||||||
state, layout, cursor, viewport, renderer,
|
state, layout, cursor, viewport, renderer,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue