summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2010-08-25 06:23:27 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2010-08-25 06:23:27 (GMT)
commit9df775a982316c34547181628e0ad244851a24ac (patch)
tree3cbba0de8d566c91dfb0411d1a03222b7aa325f6 /src/declarative/graphicsitems
parent36223d1aeb079a9628d403f87112da3b59652ba0 (diff)
parentc86fc55faa28551f06ca569d3fcc26b101efc90c (diff)
downloadQt-9df775a982316c34547181628e0ad244851a24ac.zip
Qt-9df775a982316c34547181628e0ad244851a24ac.tar.gz
Qt-9df775a982316c34547181628e0ad244851a24ac.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 7fee44e..a6e8c85 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
static const int FlickThreshold = 20;
// Really slow flicks can be annoying.
-static const int minimumFlickVelocity = 200;
+static const int MinimumFlickVelocity = 75;
QDeclarativeFlickableVisibleArea::QDeclarativeFlickableVisibleArea(QDeclarativeFlickable *parent)
: QObject(parent), flickable(parent), m_xPosition(0.), m_widthRatio(0.)
@@ -779,23 +779,15 @@ void QDeclarativeFlickablePrivate::handleMouseReleaseEvent(QGraphicsSceneMouseEv
}
vTime = timeline.time();
- if (qAbs(vData.velocity) > 10 && qAbs(event->pos().y() - pressPos.y()) > FlickThreshold) {
- qreal velocity = vData.velocity;
- if (qAbs(velocity) < minimumFlickVelocity) // Minimum velocity to avoid annoyingly slow flicks.
- velocity = velocity < 0 ? -minimumFlickVelocity : minimumFlickVelocity;
- flickY(velocity);
- } else {
+ if (qAbs(vData.velocity) > MinimumFlickVelocity && qAbs(event->pos().y() - pressPos.y()) > FlickThreshold)
+ flickY(vData.velocity);
+ else
fixupY();
- }
- if (qAbs(hData.velocity) > 10 && qAbs(event->pos().x() - pressPos.x()) > FlickThreshold) {
- qreal velocity = hData.velocity;
- if (qAbs(velocity) < minimumFlickVelocity) // Minimum velocity to avoid annoyingly slow flicks.
- velocity = velocity < 0 ? -minimumFlickVelocity : minimumFlickVelocity;
- flickX(velocity);
- } else {
+ if (qAbs(hData.velocity) > MinimumFlickVelocity && qAbs(event->pos().x() - pressPos.x()) > FlickThreshold)
+ flickX(hData.velocity);
+ else
fixupX();
- }
lastPosTime.invalidate();