summaryrefslogtreecommitdiffstats
path: root/native/src/widget/checkbox.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-12-17 05:19:14 +0100
committerLibravatar GitHub <noreply@github.com>2020-12-17 05:19:14 +0100
commit89e604d1602251f1ec16521fd714d60807217df7 (patch)
tree64d2f7683e9b465b4e85d8e12a5f01f354654fe1 /native/src/widget/checkbox.rs
parenta42b3c6998274e75fd10f5ff3cecbdb37b9e3895 (diff)
parent277ae74d6817ee6192b5f7a44de19dcbdf8d58f7 (diff)
downloadiced-89e604d1602251f1ec16521fd714d60807217df7.tar.gz
iced-89e604d1602251f1ec16521fd714d60807217df7.tar.bz2
iced-89e604d1602251f1ec16521fd714d60807217df7.zip
Merge pull request #57 from simlay/ios-support-wip
Touch support
Diffstat (limited to 'native/src/widget/checkbox.rs')
-rw-r--r--native/src/widget/checkbox.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/native/src/widget/checkbox.rs b/native/src/widget/checkbox.rs
index 81420458..77a82fad 100644
--- a/native/src/widget/checkbox.rs
+++ b/native/src/widget/checkbox.rs
@@ -6,6 +6,7 @@ use crate::layout;
use crate::mouse;
use crate::row;
use crate::text;
+use crate::touch;
use crate::{
Align, Clipboard, Element, Hasher, HorizontalAlignment, Layout, Length,
Point, Rectangle, Row, Text, VerticalAlignment, Widget,
@@ -154,7 +155,8 @@ 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::Event::FingerPressed { .. }) => {
let mouse_over = layout.bounds().contains(cursor_position);
if mouse_over {