summaryrefslogtreecommitdiffstats
path: root/widget/src/pick_list.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/pick_list.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/pick_list.rs')
-rw-r--r--widget/src/pick_list.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/widget/src/pick_list.rs b/widget/src/pick_list.rs
index d1c03bcd..dc53a9c8 100644
--- a/widget/src/pick_list.rs
+++ b/widget/src/pick_list.rs
@@ -452,7 +452,7 @@ where
state.is_open = false;
event::Status::Captured
- } else if cursor.is_over(&layout.bounds()) {
+ } else if cursor.is_over(layout.bounds()) {
state.is_open = true;
state.hovered_option =
options.iter().position(|option| Some(option) == selected);
@@ -478,7 +478,7 @@ where
let state = state();
if state.keyboard_modifiers.command()
- && cursor.is_over(&layout.bounds())
+ && cursor.is_over(layout.bounds())
&& !state.is_open
{
fn find_next<'a, T: PartialEq>(
@@ -532,7 +532,7 @@ pub fn mouse_interaction(
cursor: mouse::Cursor,
) -> mouse::Interaction {
let bounds = layout.bounds();
- let is_mouse_over = cursor.is_over(&bounds);
+ let is_mouse_over = cursor.is_over(bounds);
if is_mouse_over {
mouse::Interaction::Pointer
@@ -610,7 +610,7 @@ pub fn draw<'a, T, Renderer>(
T: ToString + 'a,
{
let bounds = layout.bounds();
- let is_mouse_over = cursor.is_over(&bounds);
+ let is_mouse_over = cursor.is_over(bounds);
let is_selected = selected.is_some();
let style = if is_mouse_over {