summaryrefslogtreecommitdiffstats
path: root/native/src/widget
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-21 19:07:30 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-21 19:07:30 +0700
commite7ae4422312e045a1fbbaa7655d4bf78ca6954a8 (patch)
tree5a5d2ff137c410762caef481159f07c79d438c78 /native/src/widget
parent1397be38ca2caaf5c49ca51e164a28b63f9e461b (diff)
downloadiced-e7ae4422312e045a1fbbaa7655d4bf78ca6954a8.tar.gz
iced-e7ae4422312e045a1fbbaa7655d4bf78ca6954a8.tar.bz2
iced-e7ae4422312e045a1fbbaa7655d4bf78ca6954a8.zip
Implement `Widget::mouse_interaction` for `Checkbox`
Diffstat (limited to 'native/src/widget')
-rw-r--r--native/src/widget/checkbox.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/native/src/widget/checkbox.rs b/native/src/widget/checkbox.rs
index babd74a5..83bc2aa3 100644
--- a/native/src/widget/checkbox.rs
+++ b/native/src/widget/checkbox.rs
@@ -186,6 +186,19 @@ where
event::Status::Ignored
}
+ fn mouse_interaction(
+ &self,
+ layout: Layout<'_>,
+ _viewport: &Rectangle,
+ cursor_position: Point,
+ ) -> mouse::Interaction {
+ if layout.bounds().contains(cursor_position) {
+ mouse::Interaction::Pointer
+ } else {
+ mouse::Interaction::default()
+ }
+ }
+
fn draw(
&self,
renderer: &mut Renderer,