on xenial help sign in
remove some old unused code
commite32461535b39147ddb6f85f6f05391cbe61f0b99 authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 25 Jul 2013, 14:27 (13 years ago) parented32b91
1 file changed−21
Launcher/LauncherPanel.qml−21
Launcher/LauncherPanel.qml−21
@@ -31,32 +31,11 @@ Item {
3131 property bool inverted: false
3232 property bool dragging: false
3333 property bool moving: launcherListView.moving || launcherListView.flicking || dndArea.draggedItem !== undefined
34− property int dragPosition: 0
3534 property int highlightIndex: -1
3635
3736 signal applicationSelected(string desktopFile)
3837 signal dashItemSelected(int index)
3938
40− onDragPositionChanged: {
41− var effectiveDragPosition = root.inverted ? launcherListView.height - dragPosition : dragPosition - mainColumn.anchors.margins
42−
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
45− var scrollableHeight = launcherListView.height - (launcherListView.itemSize + launcherListView.spacing) *2
46− // As we shortened the scrollableHeight, lets move everything down by the itemSize
47− var shortenedEffectiveDragPosition = effectiveDragPosition - launcherListView.itemSize - launcherListView.spacing
48− var newContentY = shortenedEffectiveDragPosition * hiddenContentHeight / scrollableHeight
49−
50− // limit top/bottom to prevent overshooting
51− launcherListView.contentY = Math.min(hiddenContentHeight, Math.max(0, newContentY));
52−
53− // Now calculate the current index:
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
56− // > divide by itemSize to get index
57−// highlightIndex = (effectiveDragPosition + launcherListView.contentY - mainColumn.anchors.margins*3 - launcherListView.spacing/2) / (launcherListView.itemSize + launcherColumn.spacing)
58− }
59−
6039 BorderImage {
6140 id: background
6241 source: "graphics/launcher_bg.sci"