summaryrefslogtreecommitdiffstats
path: root/native/src/widget/checkbox.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/widget/checkbox.rs')
-rw-r--r--native/src/widget/checkbox.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/native/src/widget/checkbox.rs b/native/src/widget/checkbox.rs
index 81420458..92175b25 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::{self, Touch};
use crate::{
Align, Clipboard, Element, Hasher, HorizontalAlignment, Layout, Length,
Point, Rectangle, Row, Text, VerticalAlignment, Widget,
@@ -154,7 +155,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,
+ ..
+ }) => {
let mouse_over = layout.bounds().contains(cursor_position);
if mouse_over {