@@ -46,17 +46,17 @@ Item {
4646 id: mainColumn
4747 anchors {
4848 fill: parent
49− topMargin: units.gu(0.5)
50− bottomMargin: units.gu(1)
49+// topMargin: units.gu(0.5)
50+// bottomMargin: units.gu(1)
5151 leftMargin: units.gu(0.5)
5252 rightMargin: units.gu(0.5)
5353 }
54− spacing: units.gu(0.5)
54+ //spacing: units.gu(0.5)
5555
5656 MouseArea {
5757 id: dashItem
5858 width: parent.width
59− height: units.gu(6.5)
59+ height: units.gu(7)
6060 onClicked: root.dashItemSelected(0)
6161 z: 1
6262 Image {
@@ -90,22 +90,23 @@ Item {
9090 id: launcherListView
9191 objectName: "launcherListView"
9292 anchors.fill: parent
93− anchors.topMargin: -itemSize
94− anchors.bottomMargin: -itemSize
95− topMargin: itemSize
96− bottomMargin: itemSize
93+ anchors.topMargin: -itemHeight
94+ anchors.bottomMargin: -itemHeight
95+ topMargin: itemHeight
96+ bottomMargin: itemHeight
9797 height: parent.height - dashItem.height - parent.spacing*2
9898 model: root.model
99− cacheBuffer: itemSize * 3
99+ cacheBuffer: itemHeight * 3
100100 snapMode: interactive ? ListView.SnapToItem : ListView.NoSnap
101101 highlightRangeMode: ListView.ApplyRange
102− preferredHighlightBegin: (height - itemSize) / 2
103− preferredHighlightEnd: (height + itemSize) / 2
102+ preferredHighlightBegin: (height - itemHeight) / 2
103+ preferredHighlightEnd: (height + itemHeight) / 2
104104 layoutDirection: root.inverted ? Qt.RightToLeft : Qt.LeftToRight
105105
106106 // The height of the area where icons start getting folded
107− property int foldingAreaHeight: itemSize * 0.75
108− property int itemSize: width
107+ property int foldingAreaHeight: itemHeight * 0.75
108+ property int itemWidth: width
109+ property int itemHeight: width * 7.5 / 8
109110 property int clickFlickSpeed: units.gu(60)
110111 property int draggedIndex: dndArea.draggedIndex
111112
@@ -116,8 +117,8 @@ Item {
116117 delegate: LauncherListDelegate {
117118 id: launcherDelegate
118119 objectName: "launcherDelegate" + index
119− itemHeight: launcherListView.itemSize
120− itemWidth: launcherListView.itemSize
120+ itemHeight: launcherListView.itemHeight
121+ itemWidth: launcherListView.itemWidth
121122 width: itemWidth
122123 height: itemHeight
123124 iconName: model.icon
@@ -178,9 +179,9 @@ Item {
178179 }
179180
180181 onClicked: {
181− var realItemSize = launcherListView.itemSize + launcherListView.spacing
182+ var realItemHeight = launcherListView.itemHeight + launcherListView.spacing
182183 var realContentY = launcherListView.contentY + launcherListView.topMargin
183− var index = Math.floor((mouseY + realContentY) / realItemSize);
184+ var index = Math.floor((mouseY + realContentY) / realItemHeight);
184185 var clickedItem = launcherListView.itemAt(mouseX, mouseY + realContentY)
185186
186187 print("clicked on", index, clickedItem)
@@ -234,9 +235,9 @@ Item {
234235 }
235236
236237 onPressAndHold: {
237− var realItemSize = launcherListView.itemSize + launcherListView.spacing
238+ var realItemHeight = launcherListView.itemHeight + launcherListView.spacing
238239 var realContentY = launcherListView.contentY + launcherListView.topMargin
239− draggedIndex = Math.floor((mouseY + realContentY) / realItemSize);
240+ draggedIndex = Math.floor((mouseY + realContentY) / realItemHeight);
240241
241242 launcherListView.interactive = false
242243
@@ -245,7 +246,7 @@ Item {
245246 quickListPopover = PopupUtils.open(popoverComponent, selectedItem,
246247 {model: quickListModel, appId: quickListAppId})
247248
248− var yOffset = draggedIndex > 0 ? (mouseY + realContentY) % (draggedIndex * realItemSize) : mouseY + realContentY
249+ var yOffset = draggedIndex > 0 ? (mouseY + realContentY) % (draggedIndex * realItemHeight) : mouseY + realContentY
249250
250251 fakeDragItem.iconName = launcherListView.model.get(draggedIndex).icon
251252 fakeDragItem.x = 0
@@ -263,7 +264,7 @@ Item {
263264
264265 if (!selectedItem.dragging) {
265266 var distance = Math.max(Math.abs(mouseX - startX), Math.abs(mouseY - startY))
266− if (distance > launcherListView.itemSize) {
267+ if (distance > launcherListView.itemHeight) {
267268 print("starting drag")
268269 selectedItem.dragging = true
269270 PopupUtils.close(quickListPopover)
@@ -277,18 +278,18 @@ Item {
277278 //root.dragPosition = mouseY
278279
279280 var realContentY = launcherListView.contentY + launcherListView.topMargin
280− var realItemSize = launcherListView.itemSize + launcherListView.spacing
281+ var realItemHeight = launcherListView.itemHeight + launcherListView.spacing
281282 var itemCenterY = fakeDragItem.y + fakeDragItem.height / 2
282283
283284 // Move it down by the the missing size to compensate index calculation with only expanded items
284285 itemCenterY += selectedItem.height / 2
285286
286−// print("mouseY", mouseY, launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin - realItemSize)
287− if (mouseY > launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin - realItemSize) {
287+// print("mouseY", mouseY, launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin - realItemHeight)
288+ if (mouseY > launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin - realItemHeight) {
288289// print("entered bottom area")
289290 progressiveScrollingTimer.downwards = false
290291 progressiveScrollingTimer.start()
291− } else if (mouseY < realItemSize) {
292+ } else if (mouseY < realItemHeight) {
292293 progressiveScrollingTimer.downwards = true
293294 progressiveScrollingTimer.start()
294295// print("entered top area")
@@ -297,7 +298,7 @@ Item {
297298// print("not in any area")
298299 }
299300
300− var newIndex = (itemCenterY + realContentY) / realItemSize
301+ var newIndex = (itemCenterY + realContentY) / realItemHeight
301302
302303 if (newIndex > draggedIndex + 1) {
303304 newIndex = draggedIndex + 1
@@ -330,6 +331,7 @@ Item {
330331 } else {
331332 var maxY = -mainColumn.spacing*2
332333 if (launcherListView.contentY < maxY) {
334+ print("moving upwards", launcherListView.contentY, maxY)
333335 launcherListView.contentY = Math.min(launcherListView.contentY + units.dp(2), maxY)
334336 }
335337 }
@@ -357,7 +359,7 @@ Item {
357359 bottom: parent.bottom
358360 bottomMargin: launcherListView.bottomMargin
359361 }
360− height: launcherListView.itemSize / 2
362+ height: launcherListView.itemHeight / 2
361363 enabled: launcherListView.contentHeight - launcherListView.height - launcherListView.contentY > -launcherListView.bottomMargin
362364 onClicked: launcherListView.flick(0, -launcherListView.clickFlickSpeed)
363365 }
@@ -367,8 +369,8 @@ Item {
367369 LauncherDelegate {
368370 id: fakeDragItem
369371 visible: dndArea.draggedIndex >= 0
370− itemWidth: launcherListView.itemSize
371− itemHeight: launcherListView.itemSize
372+ itemWidth: launcherListView.itemWidth
373+ itemHeight: launcherListView.itemHeight
372374 height: itemHeight
373375 width: itemWidth
374376 rotation: root.rotation