@@ -28,7 +28,7 @@ Item {
28 rotation: inverted ? 180 : 0
28 rotation: inverted ? 180 : 0
30 property var model
30 property var model
31− property bool inverted: true
31+ property bool inverted: false
32 property bool dragging: false
32 property bool dragging: false
33 property bool moving: launcherListView.moving || launcherListView.flicking || dndArea.draggedItem !== undefined
33 property bool moving: launcherListView.moving || launcherListView.flicking || dndArea.draggedItem !== undefined
34 property int dragPosition: 0
34 property int dragPosition: 0
@@ -42,9 +42,9 @@ Item {
43 var hiddenContentHeight = launcherListView.contentHeight - launcherListView.height
43 var hiddenContentHeight = launcherListView.contentHeight - launcherListView.height
44 // Shortening scrollable height because the first/last item needs to be fully expanded before reaching the top/bottom
44 // Shortening scrollable height because the first/last item needs to be fully expanded before reaching the top/bottom
45− var scrollableHeight = launcherListView.height - (launcherListView.itemSize + launcherColumn.spacing) *2
45+ var scrollableHeight = launcherListView.height - (launcherListView.itemSize + launcherListView.spacing) *2
46 // As we shortened the scrollableHeight, lets move everything down by the itemSize
46 // As we shortened the scrollableHeight, lets move everything down by the itemSize
47− var shortenedEffectiveDragPosition = effectiveDragPosition - launcherListView.itemSize - launcherColumn.spacing
47+ var shortenedEffectiveDragPosition = effectiveDragPosition - launcherListView.itemSize - launcherListView.spacing
48 var newContentY = shortenedEffectiveDragPosition * hiddenContentHeight / scrollableHeight
48 var newContentY = shortenedEffectiveDragPosition * hiddenContentHeight / scrollableHeight
50 // limit top/bottom to prevent overshooting
50 // limit top/bottom to prevent overshooting
@@ -54,7 +54,7 @@ Item {
54 // > the current mouse position + the hidden/scolled content on top is the mouse position in the averall view
54 // > the current mouse position + the hidden/scolled content on top is the mouse position in the averall view
55 // > adjust that removing all the margins
55 // > adjust that removing all the margins
56 // > divide by itemSize to get index
56 // > divide by itemSize to get index
57− highlightIndex = (effectiveDragPosition + launcherListView.contentY - mainColumn.anchors.margins*3 - launcherColumn.spacing/2) / (launcherListView.itemSize + launcherColumn.spacing)
57+// highlightIndex = (effectiveDragPosition + launcherListView.contentY - mainColumn.anchors.margins*3 - launcherListView.spacing/2) / (launcherListView.itemSize + launcherColumn.spacing)
60 BorderImage {
60 BorderImage {
@@ -236,6 +236,8 @@ Item {
236 draggedIndex = -1;
236 draggedIndex = -1;
237 drag.target = undefined
237 drag.target = undefined
238 launcherListView.interactive = true;
238 launcherListView.interactive = true;
240+ progressiveScrollingTimer.stop();
241 onPressAndHold: {
243 onPressAndHold: {
@@ -279,7 +281,7 @@ Item {
281 //launcherPanel.dragPosition = inverted ? launcherListView.height - y : y
283 //launcherPanel.dragPosition = inverted ? launcherListView.height - y : y
282− //launcherPanel.dragPosition = mouseY
284+ //root.dragPosition = mouseY
284 var realContentY = launcherListView.contentY + launcherListView.topMargin
286 var realContentY = launcherListView.contentY + launcherListView.topMargin
285 var realItemSize = launcherListView.itemSize + launcherListView.spacing
287 var realItemSize = launcherListView.itemSize + launcherListView.spacing
@@ -288,6 +290,20 @@ Item {
288 // Move it down by the the missing size to compensate index calculation with only expanded items
290 // Move it down by the the missing size to compensate index calculation with only expanded items
289 itemCenterY += selectedItem.height / 2
291 itemCenterY += selectedItem.height / 2
293+ print("mouseY", mouseY, launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin - realItemSize)
294+ if (mouseY > launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin - realItemSize) {
295+ print("entered bottom area")
296+ progressiveScrollingTimer.downwards = false
297+ progressiveScrollingTimer.start()
298+ } else if (mouseY < realItemSize) {
299+ progressiveScrollingTimer.downwards = true
300+ progressiveScrollingTimer.start()
301+ print("entered top area")
303+ progressiveScrollingTimer.stop()
304+ print("not in any area")
291 var newIndex = (itemCenterY + realContentY) / realItemSize
307 var newIndex = (itemCenterY + realContentY) / realItemSize
293 if (newIndex > draggedIndex + 1) {
309 if (newIndex > draggedIndex + 1) {
@@ -306,6 +322,25 @@ Item {
326+ id: progressiveScrollingTimer
330+ property bool downwards: true
333+ if (launcherListView.contentY > launcherListView.contentHeight - launcherListView.height) {
334+ launcherListView.contentY -= 2
337+ if (launcherListView.contentY < 0) {
338+ launcherListView.contentY += 2
309 MouseArea {
344 MouseArea {
310 id: topFoldingArea
345 id: topFoldingArea
311 anchors {
346 anchors {