final changes for better touch function

This commit is contained in:
2025-05-03 01:36:43 +02:00
parent fbe10ef97e
commit 51d78e85cf

View File

@@ -93,11 +93,11 @@ async def touch(event):
touch_start = None touch_start = None
touch_start_time = None touch_start_time = None
if abs(dx) < 30 and abs(dy) < 30 and duration < 0.3: if abs(dx) < 30 and abs(dy) < 30 and duration < 0.1:
return "snap" return "snap"
elif dx < -50 and abs(dy) < 80 and duration > 0.3: elif dx < -50 and abs(dy) < 80 and duration > 0.08:
return "tilt" return "tilt"
elif dy < -50 and abs(dx) < 80 and duration > 0.3: elif dy < -50 and abs(dx) < 80 and duration > 0.08:
return "ontop" return "ontop"
else: else:
print("touch problem") print("touch problem")