summaryrefslogtreecommitdiffstats
path: root/native/src/widget/radio.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-12-15 06:13:19 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-12-15 06:13:19 +0100
commit09110a93b06ae33af6870b4aded8637748cecace (patch)
tree64f4d9a4dde51ef44ea47f94c2079e5346df4c6c /native/src/widget/radio.rs
parenta42b3c6998274e75fd10f5ff3cecbdb37b9e3895 (diff)
parent36bdc0be1a0f959c84c18286b85c1ab51be330e6 (diff)
downloadiced-09110a93b06ae33af6870b4aded8637748cecace.tar.gz
iced-09110a93b06ae33af6870b4aded8637748cecace.tar.bz2
iced-09110a93b06ae33af6870b4aded8637748cecace.zip
Merge branch 'ios-support-wip' into feature/touch-support
Diffstat (limited to 'native/src/widget/radio.rs')
-rw-r--r--native/src/widget/radio.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/native/src/widget/radio.rs b/native/src/widget/radio.rs
index 4935569f..3a1dd386 100644
--- a/native/src/widget/radio.rs
+++ b/native/src/widget/radio.rs
@@ -4,6 +4,7 @@ use crate::layout;
use crate::mouse;
use crate::row;
use crate::text;
+use crate::touch::{self, Touch};
use crate::{
Align, Clipboard, Element, Hasher, HorizontalAlignment, Layout, Length,
Point, Rectangle, Row, Text, VerticalAlignment, Widget,
@@ -160,7 +161,11 @@ where
_clipboard: Option<&dyn Clipboard>,
) -> event::Status {
match event {
- Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)) => {
+ Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left))
+ | Event::Touch(Touch {
+ phase: touch::Phase::Started,
+ ..
+ }) => {
if layout.bounds().contains(cursor_position) {
messages.push(self.on_click.clone());