on xenial help sign in
touchX -> touchPosition.x
commitee642904fc6bce63bcba4261dec7fea9a26fef65 authorAlbert Astals Cid <albert.astals@canonical.com> dateMon 7 Dec 2015, 16:04 (11 years ago) parent98a1ad7
2 files changed+7−7
qml/Launcher/Launcher.qml+3−3 qml/Panel/IndicatorsMenu.qml+4−4
qml/Launcher/Launcher.qml+3−3
@@ -31,11 +31,11 @@ Item {
3131 property int panelWidth: units.gu(8)
3232 property int dragAreaWidth: units.gu(1)
3333 property int minimizeDistance: units.gu(26)
34− property real progress: dragArea.dragging && dragArea.touchX > panelWidth ?
35− (width * (dragArea.touchX-panelWidth) / (width - panelWidth)) : 0
34+ property real progress: dragArea.dragging && dragArea.touchPosition.x > panelWidth ?
35+ (width * (dragArea.touchPosition.x-panelWidth) / (width - panelWidth)) : 0
3636
3737 readonly property bool dragging: dragArea.dragging
38− readonly property real dragDistance: dragArea.dragging ? dragArea.touchX : 0
38+ readonly property real dragDistance: dragArea.dragging ? dragArea.touchPosition.x : 0
3939 readonly property real visibleWidth: panel.width + panel.x
4040
4141 readonly property bool shown: panel.x > -panel.width
qml/Panel/IndicatorsMenu.qml+4−4
@@ -269,7 +269,7 @@ Showable {
269269
270270 property real rowMappedLateralPosition: {
271271 if (!d.activeDragHandle) return -1;
272− return d.activeDragHandle.mapToItem(bar, d.activeDragHandle.touchX, 0).x;
272+ return d.activeDragHandle.mapToItem(bar, d.activeDragHandle.touchPosition.x, 0).x;
273273 }
274274
275275 function updateState() {
@@ -297,7 +297,7 @@ Showable {
297297 script: {
298298 yVelocityCalculator.reset();
299299 // initial item selection
300− if (!d.hasCommitted) bar.selectItemAt(d.activeDragHandle ? d.activeDragHandle.touchX : -1);
300+ if (!d.hasCommitted) bar.selectItemAt(d.activeDragHandle ? d.activeDragHandle.touchPosition.x : -1);
301301 d.hasCommitted = false;
302302 }
303303 }
@@ -315,7 +315,7 @@ Showable {
315315 target: leftScroller
316316 lateralPosition: {
317317 if (!d.activeDragHandle) return -1;
318− var mapped = d.activeDragHandle.mapToItem(leftScroller, d.activeDragHandle.touchX, 0);
318+ var mapped = d.activeDragHandle.mapToItem(leftScroller, d.activeDragHandle.touchPosition.x, 0);
319319 return mapped.x;
320320 }
321321 }
@@ -324,7 +324,7 @@ Showable {
324324 target: rightScroller
325325 lateralPosition: {
326326 if (!d.activeDragHandle) return -1;
327− var mapped = d.activeDragHandle.mapToItem(rightScroller, d.activeDragHandle.touchX, 0);
327+ var mapped = d.activeDragHandle.mapToItem(rightScroller, d.activeDragHandle.touchPosition.x, 0);
328328 return mapped.x;
329329 }
330330 }