compensate for scroll in push

This commit is contained in:
Olivier 'reivilibre' 2021-06-27 00:48:20 +01:00
parent 9e9baa725b
commit 589f3beba5
1 changed files with 2 additions and 2 deletions

View File

@ -246,7 +246,7 @@ where
);
match x {
touch::Event::FingerPressed { id, position } => {
if layout.bounds().contains(position) {
if layout.bounds().contains(position + scroll_offset) {
eprintln!("ins");
let _ = self.fingers_mid_press.insert(id);
@ -254,7 +254,7 @@ where
}
}
touch::Event::FingerMoved { id, position } => {
if !layout.bounds().contains(position) {
if !layout.bounds().contains(position + scroll_offset) {
eprintln!("exited");
let _ = self.fingers_mid_press.remove(&id);
} else {