aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickflickable.cpp
diff options
context:
space:
mode:
authorOleg Shparber <trollixx@gmail.com>2013-01-28 23:12:59 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-11 01:22:58 +0100
commit059ffd2d37446a095b3b01f615c4aea200cf6ef8 (patch)
treef871d7f098be3cbdfa4487652f829b8d201c718d /src/quick/items/qquickflickable.cpp
parentd384aa771d9146ac28ab01abdf3696723e2ff67b (diff)
Flickable: Use increased default flick parameters on BB10
Due to the high resolution the display default flicking speed is rather slow. This change introduces increased values of QML_FLICK_DEFAULTMAXVELOCITY and QML_FLICK_DEFAULTDECELERATION which feel closer to the native experience. Also cleans up the flick variables a little by moving them to their own header, so that QQuickPathView can also benefit from the improved behavior on BB10. Change-Id: I80878d4cc2a53a8f530b1dc8674f729f70a83119 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/quick/items/qquickflickable.cpp')
-rw-r--r--src/quick/items/qquickflickable.cpp47
1 files changed, 1 insertions, 46 deletions
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index 5b0c1c6756..15627aad84 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -41,6 +41,7 @@
#include "qquickflickable_p.h"
#include "qquickflickable_p_p.h"
+#include "qquickflickablebehavior_p.h"
#include "qquickwindow.h"
#include "qquickwindow_p.h"
#include "qquickevents_p_p.h"
@@ -58,52 +59,6 @@
QT_BEGIN_NAMESPACE
-// The maximum number of pixels a flick can overshoot
-#ifndef QML_FLICK_OVERSHOOT
-#define QML_FLICK_OVERSHOOT 150
-#endif
-
-// The number of samples to use in calculating the velocity of a flick
-#ifndef QML_FLICK_SAMPLEBUFFER
-#define QML_FLICK_SAMPLEBUFFER 3
-#endif
-
-// The number of samples to discard when calculating the flick velocity.
-// Touch panels often produce inaccurate results as the finger is lifted.
-#ifndef QML_FLICK_DISCARDSAMPLES
-#define QML_FLICK_DISCARDSAMPLES 0
-#endif
-
-// The default maximum velocity of a flick.
-#ifndef QML_FLICK_DEFAULTMAXVELOCITY
-#define QML_FLICK_DEFAULTMAXVELOCITY 2500
-#endif
-
-// The default deceleration of a flick.
-#ifndef QML_FLICK_DEFAULTDECELERATION
-#define QML_FLICK_DEFAULTDECELERATION 1500
-#endif
-
-// How much faster to decelerate when overshooting
-#ifndef QML_FLICK_OVERSHOOTFRICTION
-#define QML_FLICK_OVERSHOOTFRICTION 8
-#endif
-
-// Multiflick acceleration minimum flick velocity threshold
-#ifndef QML_FLICK_MULTIFLICK_THRESHOLD
-#define QML_FLICK_MULTIFLICK_THRESHOLD 1250
-#endif
-
-// Multiflick acceleration minimum contentSize/viewSize ratio
-#ifndef QML_FLICK_MULTIFLICK_RATIO
-#define QML_FLICK_MULTIFLICK_RATIO 10
-#endif
-
-// Multiflick acceleration maximum velocity multiplier
-#ifndef QML_FLICK_MULTIFLICK_MAXBOOST
-#define QML_FLICK_MULTIFLICK_MAXBOOST 3.0
-#endif
-
// FlickThreshold determines how far the "mouse" must have moved
// before we perform a flick.
static const int FlickThreshold = 15;