diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2009-11-04 14:37:18 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2009-11-04 14:38:54 (GMT) |
commit | 673973acc20ce4e068d63fa5b0391f5c785be8a3 (patch) | |
tree | 9b2f1cf075c768c6b00492c24d982c1ad03ff2a1 /src/gui/kernel/qmacgesturerecognizer_mac.mm | |
parent | 126638922389ca967c1a82b6254de8ac00042158 (diff) | |
download | Qt-673973acc20ce4e068d63fa5b0391f5c785be8a3.zip Qt-673973acc20ce4e068d63fa5b0391f5c785be8a3.tar.gz Qt-673973acc20ce4e068d63fa5b0391f5c785be8a3.tar.bz2 |
Mac: pinch gesture scales to fast and event below zero
Make the math correct.
Plus, update the imagegesture example.
Rev-By: denis
Diffstat (limited to 'src/gui/kernel/qmacgesturerecognizer_mac.mm')
-rw-r--r-- | src/gui/kernel/qmacgesturerecognizer_mac.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qmacgesturerecognizer_mac.mm b/src/gui/kernel/qmacgesturerecognizer_mac.mm index d842322..f142d71 100644 --- a/src/gui/kernel/qmacgesturerecognizer_mac.mm +++ b/src/gui/kernel/qmacgesturerecognizer_mac.mm @@ -120,7 +120,7 @@ QMacPinchGestureRecognizer::recognize(QGesture *gesture, QObject *obj, QEvent *e case QNativeGestureEvent::Zoom: g->setLastScaleFactor(g->scaleFactor()); g->setLastRotationAngle(g->rotationAngle()); - g->setScaleFactor(g->scaleFactor() + ev->percentage); + g->setScaleFactor(g->scaleFactor() * (1 + ev->percentage)); g->setChangeFlags(QPinchGesture::ScaleFactorChanged); g->setTotalChangeFlags(g->totalChangeFlags() | g->changeFlags()); return QGestureRecognizer::TriggerGesture | QGestureRecognizer::ConsumeEventHint; |