add some resistance to the drag when an app is not closeable
commit4db35052a029222953aa5d956f682a43212e5dd8
authorMichael Zanetti <michael.zanetti@canonical.com>
dateMon 7 Nov 2016, 15:07 (10 years ago)
parente20bd7b
qml/Stage/Spread/SpreadDelegateInputArea.qml+7−1
@@ -119,7 +119,13 @@ Item {
119119 }
120120 }
121121
122− d.distance = tp.y - tp.startY - offset
122+ if (root.closeable) {
123+ d.distance = tp.y - tp.startY - offset
124+ } else {
125+ var value = tp.y - tp.startY - offset;
126+ d.distance = Math.sqrt(Math.abs(value)) * (value < 0 ? -1 : 1) * 3
127+ }
128+
123129 d.pushDragEvent(tp);
124130 }
125131