aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextedit.cpp
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 02:15:33 +0000
commitcb28c76c40a9492d1a00baf61f71ad52c834ac25 (patch)
treea49d7c9e56c30ebcc07509fbb1c224551ef7eac4 /src/quick/items/qquicktextedit.cpp
parent87d6682f42c7d99db24f4681b18b58fcbe611d1a (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/items/qquicktextedit.cpp')
0 files changed, 0 insertions, 0 deletions