mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile/debug: simulate zooming through mouse wheel on desktop
And allow touchpad gestures to be recognized as well. This has no negative impact on the mobile platforms, but makes it much easier to test profile scaling / panning on the desktop. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
93ab1232f0
commit
f084852f5c
1 changed files with 10 additions and 0 deletions
|
@ -277,6 +277,16 @@ Item {
|
|||
// pass events through to the parent and eventually into the ListView
|
||||
propagateComposedEvents: true
|
||||
|
||||
// for testing / debugging on a desktop
|
||||
scrollGestureEnabled: true
|
||||
onWheel: {
|
||||
manager.appendTextToLog("wheel " + wheel.angleDelta)
|
||||
if (wheel.angleDelta.y > 0)
|
||||
qmlProfile.scale += 0.2
|
||||
if (wheel.angleDelta.y < 0 && qmlProfile.scale > 1.1)
|
||||
qmlProfile.scale -= 0.2
|
||||
}
|
||||
|
||||
anchors.fill: parent
|
||||
drag.target: qmlProfile
|
||||
drag.axis: Drag.XAndYAxis
|
||||
|
|
Loading…
Add table
Reference in a new issue