aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc/snippets/code
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2022-01-03 12:49:30 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-01-06 00:41:41 +0000
commite8c1db9f98baf1fbffb34765ca84add1854258b3 (patch)
tree2288c42d28b932a33a3e56748b9da7ce5c599bf8 /src/quick/doc/snippets/code
parenta41f00b68d4ce7e23550613a52f5c74e4a9d3664 (diff)
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. Fixes: QTBUG-99529 Change-Id: Ia9278c6fb14654d0a05b9679824ee7bdef4e219b Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 97eaba8998cad554e6466831ea8977f26c9e0de5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/quick/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions