Implement Widget::mouse_interaction for Toggler
This commit is contained in:
parent
1c2792c0a0
commit
5cd744f986
1 changed files with 13 additions and 0 deletions
|
|
@ -189,6 +189,19 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue