adjust flick velocity&deceleration to dpi

on denser screens we need more higher speed and
deceleration expressed in pixels

Change-Id: Ida366190ec99720f05b8c52f08514fc087a67948
reviewed-by: "Kai Uwe Broulik" <kde@privat.broulik.de>
This commit is contained in:
Marco Martin 2015-08-05 14:47:44 +02:00
parent b61a03c048
commit 04d946e786

View File

@ -31,6 +31,26 @@ QtQuickControlStyle.ScrollViewStyle {
transientScrollBars: false transientScrollBars: false
function syncVelocity() {
if (!control.flickableItem) {
return;
}
// QTBUG-35608
// default values are hardcoded in qtdeclarative/src/quick/items/qquickflickablebehavior_p.h
control.flickableItem.flickDeceleration = Math.round(1500 * units.devicePixelRatio);
// double maximum speed so it feels better
control.flickableItem.maximumFlickVelocity = Math.round(2500 * units.devicePixelRatio);
control.flickableItem.interactive = true;
}
Component.onCompleted: syncVelocity()
Connections {
target: control
onContentItemChanged: syncVelocity()
}
frame: Item { frame: Item {
PlasmaCore.Svg { PlasmaCore.Svg {
id: borderSvg id: borderSvg