summaryrefslogtreecommitdiffstats
path: root/widget/src/scrollable.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-06-08 20:16:46 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-06-08 20:16:46 +0200
commit5c8cfb411ed0a9a6e55bd1193cd7e97252e63d28 (patch)
treeb4f6ae33729d3ddc0d8c529a54f401fec305f00a /widget/src/scrollable.rs
parent34451bff185d8875f55747ee97ed746828e30f40 (diff)
downloadiced-5c8cfb411ed0a9a6e55bd1193cd7e97252e63d28.tar.gz
iced-5c8cfb411ed0a9a6e55bd1193cd7e97252e63d28.tar.bz2
iced-5c8cfb411ed0a9a6e55bd1193cd7e97252e63d28.zip
Take `Rectangle` by value in `Cursor` API
Diffstat (limited to 'widget/src/scrollable.rs')
-rw-r--r--widget/src/scrollable.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs
index e5cda4df..d90aca2b 100644
--- a/widget/src/scrollable.rs
+++ b/widget/src/scrollable.rs
@@ -443,7 +443,7 @@ pub fn update<Message>(
) -> event::Status,
) -> event::Status {
let bounds = layout.bounds();
- let cursor_over_scrollable = cursor.position_over(&bounds);
+ let cursor_over_scrollable = cursor.position_over(bounds);
let content = layout.children().next().unwrap();
let content_bounds = content.bounds();
@@ -698,7 +698,7 @@ pub fn mouse_interaction(
) -> mouse::Interaction,
) -> mouse::Interaction {
let bounds = layout.bounds();
- let cursor_over_scrollable = cursor.position_over(&bounds);
+ let cursor_over_scrollable = cursor.position_over(bounds);
let content_layout = layout.children().next().unwrap();
let content_bounds = content_layout.bounds();
@@ -759,7 +759,7 @@ pub fn draw<Renderer>(
let scrollbars =
Scrollbars::new(state, vertical, horizontal, bounds, content_bounds);
- let cursor_over_scrollable = cursor.position_over(&bounds);
+ let cursor_over_scrollable = cursor.position_over(bounds);
let (mouse_over_y_scrollbar, mouse_over_x_scrollbar) =
scrollbars.is_mouse_over(cursor);