aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-11-30 16:21:58 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-11-30 15:32:20 +0000
commiteac395fed121d09e39abcb322c508aa49c467074 (patch)
treeaaba35b7652c73d081f883856f40965dced90260 /src
parent86a8bcede091d0afe15c26b6fb2efcbf5989c13b (diff)
Update examples to deal correctly with fine-grained wheel events
Zooming in large steps on every wheel-events breaks with fine-grained wheel events like we get on touch-pads. We should therefore not encourage that in our examples. Change-Id: Ie2e70b91c66c73f12ef1f6cd55c8610ae70b36ed Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickevents.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp
index 520b9d46bb..88deefbd9a 100644
--- a/src/quick/items/qquickevents.cpp
+++ b/src/quick/items/qquickevents.cpp
@@ -352,10 +352,7 @@ Item {
MouseArea {
onWheel: {
if (wheel.modifiers & Qt.ControlModifier) {
- if (wheel.angleDelta.y > 0)
- zoomIn();
- else
- zoomOut();
+ adjustZoom(wheel.angleDelta.y / 120);
}
}
}