From 9cdd7c5527bac433c186842998c183e66148809d Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Sat, 26 Jun 2021 23:57:24 +0100 Subject: [PATCH] dbg --- native/src/widget/button.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/native/src/widget/button.rs b/native/src/widget/button.rs index 741d6fd2..9e779669 100644 --- a/native/src/widget/button.rs +++ b/native/src/widget/button.rs @@ -237,10 +237,11 @@ where } } Event::Touch(x) => { - eprintln!("B {:?} Bds {:?}", x, layout.bounds()); + eprintln!("B {:?} Bds {:?} P {:?}", x, layout.bounds(), self.fingers_mid_press); match x { touch::Event::FingerPressed { id, position } => { if layout.bounds().contains(position) { + eprintln!("ins"); let _ = self.fingers_mid_press.insert(id); return event::Status::Captured; @@ -248,6 +249,7 @@ where } touch::Event::FingerMoved { id, position } => { if !layout.bounds().contains(position) { + eprintln!("exited"); let _ = self.fingers_mid_press.remove(&id); } else { return event::Status::Captured; @@ -257,6 +259,7 @@ where if self.fingers_mid_press.remove(&id) && layout.bounds().contains(position) { + eprintln!("lifted"); // this should be treated as a click if let Some(on_press) = self.on_press.clone() { messages.push(on_press);