diff options
author | Robert Griebl <robert.griebl@nokia.com> | 2010-12-15 17:37:28 (GMT) |
---|---|---|
committer | Robert Griebl <robert.griebl@nokia.com> | 2010-12-15 17:51:01 (GMT) |
commit | fe438d7d828021d7f86301af36fe8dff2768532a (patch) | |
tree | 97d0d018fd65c4b58257b6110cff45928233f01a /src | |
parent | b78ffe51f9a4c4ac705e435d45fffe39864c032d (diff) | |
download | Qt-fe438d7d828021d7f86301af36fe8dff2768532a.zip Qt-fe438d7d828021d7f86301af36fe8dff2768532a.tar.gz Qt-fe438d7d828021d7f86301af36fe8dff2768532a.tar.bz2 |
QScroller: nicer Overshoot bounce back animation.
Reviewed-by: Ralf Engels
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/util/qscroller.cpp | 5 |
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; } |