From b6ae87ae55301d6c15f56e6c7df077aabe6383de Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 20 Oct 2021 19:08:13 +0700 Subject: Implement `Widget::mouse_interaction` for `Radio` --- native/src/widget/radio.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'native/src/widget/radio.rs') diff --git a/native/src/widget/radio.rs b/native/src/widget/radio.rs index ebd14517..5601a597 100644 --- a/native/src/widget/radio.rs +++ b/native/src/widget/radio.rs @@ -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, -- cgit