Commit 8b5544f5 authored by Alberto Mardegan's avatar Alberto Mardegan
Browse files

QML, ViewerPage: use mouse wheel for zooming

parent 8015de16
...@@ -109,6 +109,15 @@ Page { ...@@ -109,6 +109,15 @@ Page {
onClicked: root.moveViewMode = false onClicked: root.moveViewMode = false
} }
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton
onWheel: {
console.log("Angle delta:" + wheel.angleDelta.y)
viewer.requestedScale = viewer.scale + wheel.angleDelta.y / 120 / 20
}
}
Drawer { Drawer {
width: root.width width: root.width
edge: Qt.BottomEdge edge: Qt.BottomEdge
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment