diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-01-03 12:49:30 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-01-05 20:59:50 +0100 |
commit | 97eaba8998cad554e6466831ea8977f26c9e0de5 (patch) | |
tree | 7b9462b64691eb134e49de6a4a17703baacff662 /src/qml/doc/snippets/code | |
parent | 13399bd54d084ed837ec061ca9315dbd173f3b48 (diff) | |
download | qtdeclarative-97eaba8998cad554e6466831ea8977f26c9e0de5.tar.gz |
Flickable: make overshoot distance velocity-sensitive; limit velocity
QQuickFlickablePrivate::overShootDistance() was documented to take
velocity, but actually took the size (content width or height) instead.
When animated flicking occurs while handling wheel events, and we hit
the end-stop, we want the springy overshoot behavior to be proportional
to velocity, not always go to the max of 150 pixels.
But then the calculated velocity needs to be kept reasonable; so we
avoid updating the value if the time between updates is less than 2 ms.
This code is bypassed when the user is actually drag-flicking the
content, i.e. when the wheel events have phase() or when dragging via
mouse or touch.
Pick-to: 6.2 6.3
Fixes: QTBUG-99529
Change-Id: Ia9278c6fb14654d0a05b9679824ee7bdef4e219b
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Diffstat (limited to 'src/qml/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions