diff options
Diffstat (limited to 'src/declarative/util/qmlfollow.cpp')
-rw-r--r-- | src/declarative/util/qmlfollow.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/declarative/util/qmlfollow.cpp b/src/declarative/util/qmlfollow.cpp index d1ecac4..cf3d629 100644 --- a/src/declarative/util/qmlfollow.cpp +++ b/src/declarative/util/qmlfollow.cpp @@ -93,11 +93,11 @@ void QmlFollowPrivate::tick(int time) if (!elapsed) return; if (mode == Spring) { - if (elapsed < 10) // capped at 100fps. + if (elapsed < 16) // capped at 62fps. return; // Real men solve the spring DEs using RK4. // We'll do something much simpler which gives a result that looks fine. - int count = (elapsed+5) / 10; + int count = (elapsed+8) / 16; for (int i = 0; i < count; ++i) { qreal diff = sourceValue - currentValue; velocity = velocity + spring * diff - damping * velocity; @@ -110,14 +110,14 @@ void QmlFollowPrivate::tick(int time) else if (velocity < -maxVelocity) velocity = -maxVelocity; } - currentValue += velocity * 10.0 / 1000.0; + currentValue += velocity * 16.0 / 1000.0; } if (qAbs(velocity) < epsilon && qAbs(sourceValue - currentValue) < epsilon) { velocity = 0.0; currentValue = sourceValue; clock.stop(); } - lastTime = time - (elapsed - count * 10); + lastTime = time - (elapsed - count * 16); } else { qreal moveBy = elapsed * velocityms; qreal diff = sourceValue - currentValue; |