parent
62795909d8
commit
01429d72cd
3 changed files with 36 additions and 37 deletions
|
|
@ -762,7 +762,7 @@ where
|
|||
),
|
||||
)
|
||||
}
|
||||
_ => mouse::Cursor::Unavailable,
|
||||
_ => cursor.levitate(),
|
||||
};
|
||||
|
||||
let had_input_method = shell.input_method().is_enabled();
|
||||
|
|
@ -1178,35 +1178,33 @@ where
|
|||
let (mouse_over_y_scrollbar, mouse_over_x_scrollbar) =
|
||||
scrollbars.is_mouse_over(cursor);
|
||||
|
||||
if (mouse_over_x_scrollbar || mouse_over_y_scrollbar)
|
||||
|| state.scrollers_grabbed()
|
||||
{
|
||||
mouse::Interaction::None
|
||||
} else {
|
||||
let translation =
|
||||
state.translation(self.direction, bounds, content_bounds);
|
||||
|
||||
let cursor = match cursor_over_scrollable {
|
||||
Some(cursor_position)
|
||||
if !(mouse_over_x_scrollbar || mouse_over_y_scrollbar) =>
|
||||
{
|
||||
mouse::Cursor::Available(cursor_position + translation)
|
||||
}
|
||||
_ => mouse::Cursor::Unavailable,
|
||||
};
|
||||
|
||||
self.content.as_widget().mouse_interaction(
|
||||
&tree.children[0],
|
||||
content_layout,
|
||||
cursor,
|
||||
&Rectangle {
|
||||
y: bounds.y + translation.y,
|
||||
x: bounds.x + translation.x,
|
||||
..bounds
|
||||
},
|
||||
renderer,
|
||||
)
|
||||
if state.scrollers_grabbed() {
|
||||
return mouse::Interaction::None;
|
||||
}
|
||||
|
||||
let translation =
|
||||
state.translation(self.direction, bounds, content_bounds);
|
||||
|
||||
let cursor = match cursor_over_scrollable {
|
||||
Some(cursor_position)
|
||||
if !(mouse_over_x_scrollbar || mouse_over_y_scrollbar) =>
|
||||
{
|
||||
mouse::Cursor::Available(cursor_position + translation)
|
||||
}
|
||||
_ => cursor.levitate(),
|
||||
};
|
||||
|
||||
self.content.as_widget().mouse_interaction(
|
||||
&tree.children[0],
|
||||
content_layout,
|
||||
cursor,
|
||||
&Rectangle {
|
||||
y: bounds.y + translation.y,
|
||||
x: bounds.x + translation.x,
|
||||
..bounds
|
||||
},
|
||||
renderer,
|
||||
)
|
||||
}
|
||||
|
||||
fn overlay<'b>(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue