I’m trying to detect swipe up and swipe down gesture using Gtk.GestureSwipe
. Here’s how it looks:
ges_swipe = Gtk.GestureSwipe(n_points = 2)
ges_swipe.connect("swipe", swipe_callback)
ges_box = Gtk.Box(
height_request = 100,
width_request = 100
)
ges_box.add_controller(ges_swipe)
And the callback looks something like this:
def swipe_callback(_, velo_x, velo_y):
print("swiped", velo_x, velo_y)
It’s detecting swipes, however the velocity for both axes is always showing 0.0. If I set n_points = 1
then it shows something else but there’s also an issue, I have to double tap, hold and then move my finger to activate it. Otherwise it doesn’t even detect any swipe.