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:
parent
b61a03c048
commit
04d946e786
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user