Implement Widget::mouse_interaction for Checkbox
This commit is contained in:
parent
1397be38ca
commit
e7ae442231
1 changed files with 13 additions and 0 deletions
|
|
@ -186,6 +186,19 @@ where
|
||||||
event::Status::Ignored
|
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(
|
fn draw(
|
||||||
&self,
|
&self,
|
||||||
renderer: &mut Renderer,
|
renderer: &mut Renderer,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue