diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2014-07-31 18:10:33 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-10-18 20:22:32 +0200 |
commit | bb1f616ff19586225cd712195ca78bfc64944103 (patch) | |
tree | 86d8ef46cca86151e9c4cd3d3b928bb62030ea84 /src/gui/kernel/qsurface.cpp | |
parent | 942abaae595ea620bdeacba0f4a18b759785d61b (diff) |
Add flicking behavior hints to platform integration and theme
These will be used in QtQuick Flickable.
Flickable.flickDeceleration is a sort of friction, the rate at which a
flick will decelerate when the user is flicking on a touchscreen or
rolling a clicky mouse wheel, and then flicking stops. So far, the
default has always been 1500 (defined in qtdeclarative), which (everyone
seems to agree) prevents Flickable from slowing down reasonably fast
when scrolling stops. So let's try 5000 logical pixels / secĀ² as a
default, and each platform will be able to customize it. The docs
already say "The default value is platform dependent"; now it can come
from StyleHint::FlickDeceleration.
FlickMaximumVelocity: the units are in logical pixels / sec. The default
has always been 2500 in qtdeclarative, but there were some early
complaints that Flickable was too slow on Android, for example (which
were somewhat mitigated by DPI conversions). So now that also becomes
adjustable on each platform (although really, it should be mainly the
DPI that matters, because the user's perception is in actual distance
moved per second).
FlickStartDistance is how many logical pixels the Flickable must be
dragged by a finger before it begins the animation to keep moving when
the finger is lifted. (Analogous to StartDragDistance for mouse-drags)
[ChangeLog][QPA] Added platform FlickStartDistance, FlickMaximumVelocity
and FlickDeceleration hints for the benefit of QtQuick Flickable
Task-number: QTBUG-35608
Task-number: QTBUG-35609
Task-number: QTBUG-52643
Task-number: QTBUG-97055
Change-Id: If50c1de895c127f4b0ab0634c865f469a38e08ba
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/gui/kernel/qsurface.cpp')
0 files changed, 0 insertions, 0 deletions