mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
better name for two finger tap gesture
This commit is contained in:
parent
e0d2c5cfcf
commit
0acd1a8182
@ -317,6 +317,8 @@ class IframeBoss:
|
||||
def handle_gesture(self, gesture):
|
||||
if gesture.type is 'show-chrome':
|
||||
self.send_message('show_chrome')
|
||||
elif gesture.type is 'two-finger-tap':
|
||||
self.send_message('show_chrome')
|
||||
elif gesture.type is 'pinch':
|
||||
self.send_message('bump_font_size', increase=gesture.direction is 'out')
|
||||
elif gesture.type is 'long-tap':
|
||||
|
@ -82,7 +82,7 @@ def interpret_double_gesture(touch1, touch2, gesture_id):
|
||||
max_y_displacement1 = max_displacement(touch1.viewport_y)
|
||||
max_y_displacement2 = max_displacement(touch2.viewport_y)
|
||||
if max(max_x_displacement1, max_y_displacement1) < TAP_THRESHOLD and max(max_x_displacement2, max_y_displacement2) < TAP_THRESHOLD:
|
||||
ans.type = 'double-tap'
|
||||
ans.type = 'two-finger-tap'
|
||||
ans.viewport_x1 = touch1.viewport_x[0]
|
||||
ans.viewport_y1 = touch1.viewport_y[0]
|
||||
ans.viewport_x2 = touch2.viewport_x[0]
|
||||
@ -288,10 +288,9 @@ class BookTouchHandler(TouchHandler):
|
||||
if gesture.type is 'pinch':
|
||||
if gesture.active:
|
||||
return
|
||||
if gesture.type is 'double-tap':
|
||||
if gesture.type is 'two-finger-tap':
|
||||
if gesture.active:
|
||||
return
|
||||
gesture.type = 'show-chrome'
|
||||
if self.for_side_margin:
|
||||
ui_operations.forward_gesture(gesture)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user