summaryrefslogtreecommitdiffstats
path: root/src/gui/util
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@nokia.com>2010-12-15 17:37:28 (GMT)
committerRobert Griebl <robert.griebl@nokia.com>2010-12-15 17:51:01 (GMT)
commitfe438d7d828021d7f86301af36fe8dff2768532a (patch)
tree97d0d018fd65c4b58257b6110cff45928233f01a /src/gui/util
parentb78ffe51f9a4c4ac705e435d45fffe39864c032d (diff)
downloadQt-fe438d7d828021d7f86301af36fe8dff2768532a.zip
Qt-fe438d7d828021d7f86301af36fe8dff2768532a.tar.gz
Qt-fe438d7d828021d7f86301af36fe8dff2768532a.tar.bz2
QScroller: nicer Overshoot bounce back animation.
Reviewed-by: Ralf Engels
Diffstat (limited to 'src/gui/util')
-rw-r--r--src/gui/util/qscroller.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/util/qscroller.cpp b/src/gui/util/qscroller.cpp
index f651a06..2ca4a6e 100644
--- a/src/gui/util/qscroller.cpp
+++ b/src/gui/util/qscroller.cpp
@@ -1367,9 +1367,8 @@ void QScrollerPrivate::createScrollingSegments(qreal v, qreal startPos, qreal pp
qreal oDistance = viewSize * sp->overshootScrollDistanceFactor * endV / sp->maximumVelocity;
qreal oDeltaTime = sp->overshootScrollTime;
- pushSegment(ScrollTypeOvershoot, oDeltaTime * 0.5, stopPos, stopPos + oDistance, sp->scrollingCurve.type(), orientation);
- pushSegment(ScrollTypeOvershoot, oDeltaTime * 0.3, stopPos + oDistance, stopPos + oDistance * 0.3, QEasingCurve::InQuad, orientation);
- pushSegment(ScrollTypeOvershoot, oDeltaTime * 0.2, stopPos + oDistance * 0.3, stopPos, QEasingCurve::OutQuad, orientation);
+ pushSegment(ScrollTypeOvershoot, oDeltaTime * 0.3, stopPos, stopPos + oDistance, sp->scrollingCurve.type(), orientation);
+ pushSegment(ScrollTypeOvershoot, oDeltaTime * 0.7, stopPos + oDistance, stopPos, sp->scrollingCurve.type(), orientation);
}
return;
}