on xenial help sign in
increase threshold and avoid jumping in SpreadDelegate dragging
commitff50a934248a5b7b33eb9c2eddd1cb706da3e3e4 authorMichael Zanetti <michael.zanetti@canonical.com> dateMon 17 Nov 2014, 10:25 (12 years ago) parentc26442a
1 file changed+3−2
qml/Stages/SpreadDelegate.qml+3−2
qml/Stages/SpreadDelegate.qml+3−2
@@ -75,6 +75,7 @@ Item {
7575
7676 property bool moving: false
7777 property real distance: 0
78+ property int threshold: units.gu(2)
7879
7980 readonly property real minSpeedToClose: units.gu(40)
8081
@@ -82,9 +83,9 @@ Item {
8283 if (!dragging) {
8384 return;
8485 }
85− moving = moving || Math.abs(dragValue) > units.gu(1)
86+ moving = moving || Math.abs(dragValue) > threshold;
8687 if (moving) {
87− distance = dragValue;
88+ distance = dragValue + (dragValue > 0 ? -threshold: threshold);
8889 }
8990 }
9091