on xenial help sign in
increase threshold and avoid jumping in SpreadDelegate dragging
ff50a93Michael Zanetti
qml/Stages/SpreadDelegate.qml+3−2
@@ -75,6 +75,7 @@ Item {
75
75
76 property bool moving: false
76 property bool moving: false
77 property real distance: 0
77 property real distance: 0
78+ property int threshold: units.gu(2)
78
79
79 readonly property real minSpeedToClose: units.gu(40)
80 readonly property real minSpeedToClose: units.gu(40)
80
81
@@ -82,9 +83,9 @@ Item {
82 if (!dragging) {
83 if (!dragging) {
83 return;
84 return;
84 }
85 }
85− moving = moving || Math.abs(dragValue) > units.gu(1)
86+ moving = moving || Math.abs(dragValue) > threshold;
86 if (moving) {
87 if (moving) {
87− distance = dragValue;
88+ distance = dragValue + (dragValue > 0 ? -threshold: threshold);
88 }
89 }
89 }
90 }
90
91