From 89c5d33c94c96f13d7b1f15e815c78bfdaf38c87 Mon Sep 17 00:00:00 2001 From: SeeLook <945374+SeeLook@users.noreply.github.com> Date: Thu, 21 Sep 2017 22:30:02 +0200 Subject: [PATCH] Zoom score with mouse wheel + CTRL --- src/qml/MainScore.qml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/qml/MainScore.qml b/src/qml/MainScore.qml index ee49bb478..eab2cd3f4 100644 --- a/src/qml/MainScore.qml +++ b/src/qml/MainScore.qml @@ -43,6 +43,26 @@ Score { scoreObj.enableDoubleAccidentals: GLOB.enableDoubleAccids scoreObj.allowAdding: true + Timer { id: zoomTimer; interval: 500 } + MouseArea { + anchors.fill: parent + onWheel: { + if (wheel.modifiers & Qt.ControlModifier) { + if (wheel.angleDelta.y > 0) { + if (!zoomTimer.running) { + zoomInAct.trigger() + zoomTimer.running = true + } + } else if (wheel.angleDelta.y < 0) { + if (!zoomTimer.running) { + zoomOutAct.trigger() + zoomTimer.running = true + } + } + } + } + } + Text { id: keyName parent: firstStaff -- GitLab