on xenial help sign in
Use touchPosition.x since it's only used for calculating the x difference
commit192379f85748495d94f97b64b72d26a4dd833e2b authorAlbert Astals Cid <albert.astals@canonical.com> dateMon 7 Dec 2015, 12:30 (11 years ago) parent424c462
1 file changed+6−7
qml/Panel/IndicatorsMenu.qml+6−7
qml/Panel/IndicatorsMenu.qml+6−7
@@ -225,11 +225,10 @@ Showable {
225225 stretch: true
226226 maxTotalDragDistance: openedHeight - expandedPanelHeight - handle.height
227227
228− // TODO touchScene is gone :/
229− onTouchSceneXChanged: {
228+ onTouchPositionChanged: {
230229 if (root.state === "locked") {
231− d.xDisplacementSinceLock += (touchSceneX - d.lastHideTouchSceneX)
232− d.lastHideTouchSceneX = touchSceneX;
230+ d.xDisplacementSinceLock += (touchPosition.x - d.lastHideTouchX)
231+ d.lastHideTouchX = touchPosition.x;
233232 }
234233 }
235234 }
@@ -264,7 +263,7 @@ Showable {
264263 id: d
265264 property var activeDragHandle: showDragHandle.dragging ? showDragHandle : hideDragHandle.dragging ? hideDragHandle : null
266265 property bool hasCommitted: false
267− property real lastHideTouchSceneX: 0
266+ property real lastHideTouchX: 0
268267 property real xDisplacementSinceLock: 0
269268 onXDisplacementSinceLockChanged: d.updateState()
270269
@@ -335,7 +334,7 @@ Showable {
335334 StateChangeScript {
336335 script: {
337336 d.xDisplacementSinceLock = 0;
338− d.lastHideTouchSceneX = hideDragHandle.touchSceneX;
337+ d.lastHideTouchX = hideDragHandle.touchPosition.x;
339338 }
340339 }
341340 PropertyChanges { target: bar; expanded: true }
@@ -347,7 +346,7 @@ Showable {
347346 PropertyChanges {
348347 target: d;
349348 hasCommitted: true
350− lastHideTouchSceneX: 0
349+ lastHideTouchX: 0
351350 xDisplacementSinceLock: 0
352351 restoreEntryValues: false
353352 }