diff options
author | Robert Griebl <robert.griebl@nokia.com> | 2010-12-15 18:37:28 +0100 |
---|---|---|
committer | Robert Griebl <robert.griebl@nokia.com> | 2010-12-15 18:51:01 +0100 |
commit | fe438d7d828021d7f86301af36fe8dff2768532a (patch) | |
tree | 97d0d018fd65c4b58257b6110cff45928233f01a /src/gui/util | |
parent | b78ffe51f9a4c4ac705e435d45fffe39864c032d (diff) |
QScroller: nicer Overshoot bounce back animation.
Reviewed-by: Ralf Engels
Diffstat (limited to 'src/gui/util')
-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 f651a06a56..2ca4a6e4b8 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; } |