Take Rectangle by value in Cursor API

This commit is contained in:
Héctor Ramón Jiménez 2023-06-08 20:16:46 +02:00
parent 34451bff18
commit 5c8cfb411e
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
21 changed files with 57 additions and 62 deletions

View file

@ -552,7 +552,7 @@ where
let state = state();
let click_position = if on_input.is_some() {
cursor.position_over(&layout.bounds())
cursor.position_over(layout.bounds())
} else {
None
};
@ -971,7 +971,7 @@ pub fn draw<Renderer>(
let mut children_layout = layout.children();
let text_bounds = children_layout.next().unwrap().bounds();
let is_mouse_over = cursor.is_over(&bounds);
let is_mouse_over = cursor.is_over(bounds);
let appearance = if is_disabled {
theme.disabled(style)
@ -1161,7 +1161,7 @@ pub fn mouse_interaction(
cursor: mouse::Cursor,
is_disabled: bool,
) -> mouse::Interaction {
if cursor.is_over(&layout.bounds()) {
if cursor.is_over(layout.bounds()) {
if is_disabled {
mouse::Interaction::NotAllowed
} else {