From b803c34338b2836212c71f7a311d4f095988dec2 Mon Sep 17 00:00:00 2001 From: miruka Date: Mon, 20 Jul 2020 14:30:00 -0400 Subject: [PATCH] Make middle click also work outside of image --- .../Popups/ImageViewerPopup/ViewerCanvas.qml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/gui/Popups/ImageViewerPopup/ViewerCanvas.qml b/src/gui/Popups/ImageViewerPopup/ViewerCanvas.qml index cc409aaf..dd0a9d4b 100644 --- a/src/gui/Popups/ImageViewerPopup/ViewerCanvas.qml +++ b/src/gui/Popups/ImageViewerPopup/ViewerCanvas.qml @@ -24,6 +24,12 @@ HFlickable { gesturePolicy: TapHandler.ReleaseWithinBounds } + TapHandler { + acceptedButtons: Qt.MiddleButton + gesturePolicy: TapHandler.ReleaseWithinBounds + onTapped: viewer.openExternallyRequested() + } + MouseArea { anchors.fill: parent acceptedButtons: Qt.NoButton @@ -127,18 +133,6 @@ HFlickable { } onDoubleTapped: viewer.toggleFulLScreen() } - - TapHandler { - acceptedButtons: Qt.MiddleButton - gesturePolicy: TapHandler.ReleaseWithinBounds - onTapped: viewer.openExternallyRequested() - } - - TapHandler { - acceptedButtons: Qt.RightButton - gesturePolicy: TapHandler.ReleaseWithinBounds - onTapped: viewer.close() - } } } }