summaryrefslogtreecommitdiffstats
path: root/src/widgets/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/util')
-rw-r--r--src/widgets/util/qscroller.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/widgets/util/qscroller.cpp b/src/widgets/util/qscroller.cpp
index e39ed9c0a5..2c8b617761 100644
--- a/src/widgets/util/qscroller.cpp
+++ b/src/widgets/util/qscroller.cpp
@@ -1293,6 +1293,16 @@ void QScrollerPrivate::createScrollingSegments(qreal v, qreal startPos,
qScrollerDebug() << " Real Delta:" << deltaPos;
+ // -- check if are in overshoot and end in overshoot
+ if ((startPos < minPos && endPos < minPos) ||
+ (startPos > maxPos && endPos > maxPos)) {
+ qreal stopPos = endPos < minPos ? minPos : maxPos;
+ qreal oDeltaTime = sp->overshootScrollTime;
+
+ pushSegment(ScrollTypeOvershoot, oDeltaTime * qreal(0.7), qreal(1.0), startPos, stopPos - startPos, stopPos, sp->scrollingCurve.type(), orientation);
+ return;
+ }
+
// -- determine snap points
qreal nextSnap = nextSnapPos(endPos, 0, orientation);
qreal lowerSnapPos = nextSnapPos(startPos, -1, orientation);
@@ -1306,16 +1316,6 @@ void QScrollerPrivate::createScrollingSegments(qreal v, qreal startPos,
if (nextSnap < lowerSnapPos || qIsNaN(lowerSnapPos))
lowerSnapPos = nextSnap;
- // -- check if are in overshoot and end in overshoot
- if ((startPos < minPos && endPos < minPos) ||
- (startPos > maxPos && endPos > maxPos)) {
- qreal stopPos = endPos < minPos ? minPos : maxPos;
- qreal oDeltaTime = sp->overshootScrollTime;
-
- pushSegment(ScrollTypeOvershoot, oDeltaTime * qreal(0.7), qreal(1.0), startPos, stopPos - startPos, stopPos, sp->scrollingCurve.type(), orientation);
- return;
- }
-
if (qAbs(v) < sp->minimumVelocity) {
qScrollerDebug() << "### below minimum Vel" << orientation;