mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
disable pinch to zoom gesture
This commit is contained in:
parent
e635157ee4
commit
7bd33242cf
1 changed files with 8 additions and 0 deletions
|
@ -92,6 +92,14 @@ class AnkiWebView(QWebEngineView):
|
|||
context=Qt.WidgetWithChildrenShortcut,
|
||||
activated=fn)
|
||||
|
||||
self.focusProxy().installEventFilter(self)
|
||||
|
||||
def eventFilter(self, obj, evt):
|
||||
# disable pinch to zoom gesture
|
||||
if isinstance(evt, QNativeGestureEvent):
|
||||
return True
|
||||
return False
|
||||
|
||||
def onEsc(self):
|
||||
w = self.parent()
|
||||
while w:
|
||||
|
|
Loading…
Reference in a new issue