diff options
author | 2021-10-20 19:08:13 +0700 | |
---|---|---|
committer | 2021-10-20 19:19:20 +0700 | |
commit | b6ae87ae55301d6c15f56e6c7df077aabe6383de (patch) | |
tree | 7735ddafe42bdfd091217db44204efb621b6961e /native/src/widget | |
parent | 47c8f6ceee801bd2896cd075097dcb075ff070d7 (diff) | |
download | iced-b6ae87ae55301d6c15f56e6c7df077aabe6383de.tar.gz iced-b6ae87ae55301d6c15f56e6c7df077aabe6383de.tar.bz2 iced-b6ae87ae55301d6c15f56e6c7df077aabe6383de.zip |
Implement `Widget::mouse_interaction` for `Radio`
Diffstat (limited to 'native/src/widget')
-rw-r--r-- | native/src/widget/radio.rs | 13 |
1 files changed, 13 insertions, 0 deletions
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, |