Implement Widget::mouse_interaction for Radio

This commit is contained in:
Héctor Ramón Jiménez 2021-10-20 19:08:13 +07:00
parent 47c8f6ceee
commit b6ae87ae55
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -200,6 +200,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,