on xenial help sign in
Use touchPosition.x since it's only used for calculating the x difference
192379fAlbert Astals Cid
qml/Panel/IndicatorsMenu.qml+6−7
@@ -225,11 +225,10 @@ Showable {
225 stretch: true
225 stretch: true
226 maxTotalDragDistance: openedHeight - expandedPanelHeight - handle.height
226 maxTotalDragDistance: openedHeight - expandedPanelHeight - handle.height
227
227
228− // TODO touchScene is gone :/
228+ onTouchPositionChanged: {
229− onTouchSceneXChanged: {
230 if (root.state === "locked") {
229 if (root.state === "locked") {
231− d.xDisplacementSinceLock += (touchSceneX - d.lastHideTouchSceneX)
230+ d.xDisplacementSinceLock += (touchPosition.x - d.lastHideTouchX)
232− d.lastHideTouchSceneX = touchSceneX;
231+ d.lastHideTouchX = touchPosition.x;
233 }
232 }
234 }
233 }
235 }
234 }
@@ -264,7 +263,7 @@ Showable {
264 id: d
263 id: d
265 property var activeDragHandle: showDragHandle.dragging ? showDragHandle : hideDragHandle.dragging ? hideDragHandle : null
264 property var activeDragHandle: showDragHandle.dragging ? showDragHandle : hideDragHandle.dragging ? hideDragHandle : null
266 property bool hasCommitted: false
265 property bool hasCommitted: false
267− property real lastHideTouchSceneX: 0
266+ property real lastHideTouchX: 0
268 property real xDisplacementSinceLock: 0
267 property real xDisplacementSinceLock: 0
269 onXDisplacementSinceLockChanged: d.updateState()
268 onXDisplacementSinceLockChanged: d.updateState()
270
269
@@ -335,7 +334,7 @@ Showable {
335 StateChangeScript {
334 StateChangeScript {
336 script: {
335 script: {
337 d.xDisplacementSinceLock = 0;
336 d.xDisplacementSinceLock = 0;
338− d.lastHideTouchSceneX = hideDragHandle.touchSceneX;
337+ d.lastHideTouchX = hideDragHandle.touchPosition.x;
339 }
338 }
340 }
339 }
341 PropertyChanges { target: bar; expanded: true }
340 PropertyChanges { target: bar; expanded: true }
@@ -347,7 +346,7 @@ Showable {
347 PropertyChanges {
346 PropertyChanges {
348 target: d;
347 target: d;
349 hasCommitted: true
348 hasCommitted: true
350− lastHideTouchSceneX: 0
349+ lastHideTouchX: 0
351 xDisplacementSinceLock: 0
350 xDisplacementSinceLock: 0
352 restoreEntryValues: false
351 restoreEntryValues: false
353 }
352 }