@@ -48,7 +48,7 @@ Item {
48 anchors.fill: parent
48 anchors.fill: parent
49 anchors.leftMargin: -itemWidth
49 anchors.leftMargin: -itemWidth
50 anchors.rightMargin: -itemWidth
50 anchors.rightMargin: -itemWidth
51− interactive: false
51+// interactive: false
53 orientation: ListView.Horizontal
53 orientation: ListView.Horizontal
54 spacing: units.gu(1)
54 spacing: units.gu(1)
@@ -178,17 +178,25 @@ Item {
178 id: mouseArea
178 id: mouseArea
179 anchors.fill: parent
179 anchors.fill: parent
180 hoverEnabled: true
180 hoverEnabled: true
181− preventStealing: true
181+ propagateComposedEvents: true
182 anchors.leftMargin: listView.leftMargin
182 anchors.leftMargin: listView.leftMargin
183 anchors.rightMargin: listView.rightMargin
183 anchors.rightMargin: listView.rightMargin
185 property int draggedIndex: -1
185 property int draggedIndex: -1
187+ property int startX: 0
188+ property int startY: 0
187 onMouseXChanged: {
190 onMouseXChanged: {
191+ if (!pressed || dragging) {
188− var progress = Math.max(0, Math.min(1, (mouseX - listView.foldingAreaWidth) / (width - listView.foldingAreaWidth * 2)))
192+ var progress = Math.max(0, Math.min(1, (mouseX - listView.foldingAreaWidth) / (width - listView.foldingAreaWidth * 2)))
189−// var progress = mouseX / width
190− print("p:", progress)
191− listView.contentX = listView.originX + (listView.contentWidth - listView.width + listView.leftMargin + listView.rightMargin) * progress - listView.leftMargin
193+ listView.contentX = listView.originX + (listView.contentWidth - listView.width + listView.leftMargin + listView.rightMargin) * progress - listView.leftMargin
197+ if (Math.abs(mouseY - startY) > units.gu(3)) {
198+ drag.axis = Drag.XAndYAxis;
194 onReleased: {
202 onReleased: {
@@ -205,6 +213,8 @@ Item {
207 onPressed: {
215 onPressed: {
208 if (listView.model.count < 2) return;
218 if (listView.model.count < 2) return;
210 var coords = mapToItem(listView.contentItem, mouseX, mouseY)
220 var coords = mapToItem(listView.contentItem, mouseX, mouseY)
@@ -220,6 +230,7 @@ Item {
220 fakeDragItem.Drag.hotSpot.x = mouseCoordsInItem.x
230 fakeDragItem.Drag.hotSpot.x = mouseCoordsInItem.x
221 fakeDragItem.Drag.hotSpot.y = mouseCoordsInItem.y
231 fakeDragItem.Drag.hotSpot.y = mouseCoordsInItem.y
233+ drag.axis = Drag.YAxis;
223 drag.target = fakeDragItem;
234 drag.target = fakeDragItem;