Make middle click also work outside of image

This commit is contained in:
miruka 2020-07-20 14:30:00 -04:00
parent 66a44b5251
commit b803c34338

View File

@ -24,6 +24,12 @@ HFlickable {
gesturePolicy: TapHandler.ReleaseWithinBounds gesturePolicy: TapHandler.ReleaseWithinBounds
} }
TapHandler {
acceptedButtons: Qt.MiddleButton
gesturePolicy: TapHandler.ReleaseWithinBounds
onTapped: viewer.openExternallyRequested()
}
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
acceptedButtons: Qt.NoButton acceptedButtons: Qt.NoButton
@ -127,18 +133,6 @@ HFlickable {
} }
onDoubleTapped: viewer.toggleFulLScreen() onDoubleTapped: viewer.toggleFulLScreen()
} }
TapHandler {
acceptedButtons: Qt.MiddleButton
gesturePolicy: TapHandler.ReleaseWithinBounds
onTapped: viewer.openExternallyRequested()
}
TapHandler {
acceptedButtons: Qt.RightButton
gesturePolicy: TapHandler.ReleaseWithinBounds
onTapped: viewer.close()
}
} }
} }
} }