summaryrefslogtreecommitdiffstats
path: root/widget/src/text_input.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/text_input.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/text_input.rs')
-rw-r--r--widget/src/text_input.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/widget/src/text_input.rs b/widget/src/text_input.rs
index 5b3705d4..272263f9 100644
--- a/widget/src/text_input.rs
+++ b/widget/src/text_input.rs
@@ -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 {