summaryrefslogtreecommitdiffstats
path: root/native/src/widget/checkbox.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/checkbox.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/checkbox.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/native/src/widget/checkbox.rs b/native/src/widget/checkbox.rs
index 26665d8b..7b2345de 100644
--- a/native/src/widget/checkbox.rs
+++ b/native/src/widget/checkbox.rs
@@ -2,7 +2,7 @@
use std::hash::Hash;
use crate::{
- input::{mouse, touch::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,
@@ -156,7 +156,10 @@ where
button: mouse::Button::Left,
state: ButtonState::Pressed,
})
- | Event::Touch(Touch::Started { .. }) => {
+ | Event::Touch(Touch {
+ phase: touch::Phase::Started,
+ ..
+ }) => {
let mouse_over = layout.bounds().contains(cursor_position);
if mouse_over {