summaryrefslogtreecommitdiffstats
path: root/native/src/widget/radio.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-19 12:17:16 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-19 12:17:16 +0100
commitd3572e1b819ff4d40de4f39f48eab71b9d0d4d5e (patch)
tree80d635749e4941004055f16a7ca5c35e11f3caa9 /native/src/widget/radio.rs
parente19a07d40049f40f36d879a498fab4ce63778b27 (diff)
downloadiced-d3572e1b819ff4d40de4f39f48eab71b9d0d4d5e.tar.gz
iced-d3572e1b819ff4d40de4f39f48eab71b9d0d4d5e.tar.bz2
iced-d3572e1b819ff4d40de4f39f48eab71b9d0d4d5e.zip
Turn `Touch` into a struct and add finger id
Diffstat (limited to '')
-rw-r--r--native/src/widget/radio.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/native/src/widget/radio.rs b/native/src/widget/radio.rs
index 8a9c02ce..46983db3 100644
--- a/native/src/widget/radio.rs
+++ b/native/src/widget/radio.rs
@@ -1,6 +1,6 @@
//! Create choices using radio buttons.
use crate::{
- input::{mouse, touch, ButtonState},
+ input::{mouse, touch, ButtonState, Touch},
layout, row, text, Align, Clipboard, Element, Event, Font, Hasher,
HorizontalAlignment, Layout, Length, Point, Rectangle, Row, Text,
VerticalAlignment, Widget,
@@ -122,7 +122,10 @@ where
button: mouse::Button::Left,
state: ButtonState::Pressed,
})
- | Event::Touch(touch::Touch::Started { .. }) => {
+ | Event::Touch(Touch {
+ phase: touch::Phase::Started,
+ ..
+ }) => {
if layout.bounds().contains(cursor_position) {
messages.push(self.on_click.clone());
}