on xenial help sign in
properly reset the drawer state when cancelling a horizontal drag
commita842e89a4af6648dca3a5e90438cae28b44e97cb authorMichael Zanetti <michael.zanetti@canonical.com> dateFri 3 Mar 2017, 12:49 (10 years ago) parent78e61ae
1 file changed+4−1
qml/Launcher/Drawer.qml+4−1
qml/Launcher/Drawer.qml+4−1
@@ -212,13 +212,16 @@ FocusScope {
212212 root.dragDistance += diff;
213213 oldX = mouseX
214214 }
215− onReleased: {
215+ onReleased: reset();
216+ onCanceled: reset();
217+ function reset() {
216218 if (root.draggingHorizontally) {
217219 root.draggingHorizontally = false;
218220 parent.interactive = true;
219221 }
220222 reactivateTimer.start();
221223 }
224+
222225 Timer {
223226 id: reactivateTimer
224227 interval: 0