@@ -117,7 +117,7 @@ Item {
117 property int draggedIndex: dndArea.draggedIndex
117 property int draggedIndex: dndArea.draggedIndex
119 displaced: Transition {
119 displaced: Transition {
120− NumberAnimation { properties: "x,y"; duration: 100 }
120+ NumberAnimation { properties: "x,y"; duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
123 delegate: LauncherListDelegate {
123 delegate: LauncherListDelegate {
@@ -137,12 +137,15 @@ Item {
137 ThinDivider {
137 ThinDivider {
138 anchors.centerIn: parent
138 anchors.centerIn: parent
139 width: parent.width + mainColumn.anchors.leftMargin + mainColumn.anchors.rightMargin
139 width: parent.width + mainColumn.anchors.leftMargin + mainColumn.anchors.rightMargin
140− visible: parent.dragging
140+ opacity: parent.dragging ? 1 : 0
141+ Behavior on opacity {
142+ NumberAnimation { duration: UbuntuAnimation.FastDuration }
143 states: [
146 states: [
145− name: "pre-dragging"
148+ name: "selected"
146 when: dndArea.selectedItem === launcherDelegate && fakeDragItem.visible && !dragging
149 when: dndArea.selectedItem === launcherDelegate && fakeDragItem.visible && !dragging
147 PropertyChanges {
150 PropertyChanges {
148 target: launcherDelegate
151 target: launcherDelegate
@@ -154,27 +157,52 @@ Item {
154 when: dragging
157 when: dragging
155 PropertyChanges {
158 PropertyChanges {
156 target: launcherDelegate
159 target: launcherDelegate
157− offset: effectiveHeight / 2
160+ offset: units.gu(0.5)
158 height: units.gu(1)
161 height: units.gu(1)
159 itemOpacity: 0
162 itemOpacity: 0
163 name: "expanded"
166 name: "expanded"
164− when: dndArea.draggedIndex >= 0 && !dragging
167+ when: dndArea.draggedIndex >= 0 && (dndArea.preDragging || dndArea.selectedItem.dragging) && !dragging
165 PropertyChanges {
168 PropertyChanges {
166 target: launcherDelegate
169 target: launcherDelegate
168 offset: 0
171 offset: 0
177+ onStateChanged: if (index == 5) print("state changed to", state)
173 transitions: [
178 transitions: [
182+ NumberAnimation { properties: "itemOpacity"; duration: UbuntuAnimation.FastDuration }
174 Transition {
184 Transition {
175 from: "*"
185 from: "*"
187+ NumberAnimation { properties: "itemOpacity"; duration: UbuntuAnimation.FastDuration }
188+ NumberAnimation { properties: "angle,offset"; duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
193+ NumberAnimation { properties: "itemOpacity"; duration: UbuntuAnimation.BriskDuration }
194+ NumberAnimation { properties: "angle,offset"; duration: UbuntuAnimation.BriskDuration; easing: UbuntuAnimation.StandardEasing }
199+ NumberAnimation { properties: "height"; duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
177− NumberAnimation { properties: "angle,height,itemOpacity"; duration: 150 }
204+ NumberAnimation { properties: "itemOpacity"; duration: UbuntuAnimation.BriskDuration }
205+ NumberAnimation { properties: "height"; duration: UbuntuAnimation.BriskDuration; easing: UbuntuAnimation.StandardEasing }
@@ -187,6 +215,7 @@ Item {
188 property int draggedIndex: -1
216 property int draggedIndex: -1
189 property var selectedItem
217 property var selectedItem
218+ property bool preDragging: false
190 property int startX
219 property int startX
191 property int startY
220 property int startY
192 property var quickListPopover
221 property var quickListPopover
@@ -228,14 +257,16 @@ Item {
228 onCanceled: {
257 onCanceled: {
229 selectedItem.highlighted = false
258 selectedItem.highlighted = false
230 selectedItem = undefined;
259 selectedItem = undefined;
260+ preDragging = false;
233 onReleased: {
263 onReleased: {
234 selectedItem.highlighted = false
265 selectedItem.highlighted = false
235 selectedItem.dragging = false;
266 selectedItem.dragging = false;
236 selectedItem = undefined;
267 selectedItem = undefined;
268+ preDragging = false;
239 drag.target = undefined
270 drag.target = undefined
241 progressiveScrollingTimer.stop();
272 progressiveScrollingTimer.stop();
@@ -271,9 +302,13 @@ Item {
272 if (!selectedItem.dragging) {
303 if (!selectedItem.dragging) {
273 var distance = Math.max(Math.abs(mouseX - startX), Math.abs(mouseY - startY))
304 var distance = Math.max(Math.abs(mouseX - startX), Math.abs(mouseY - startY))
305+ if (!preDragging && distance > units.gu(1.5)) {
306+ PopupUtils.close(quickListPopover)
274 if (distance > launcherListView.itemHeight) {
309 if (distance > launcherListView.itemHeight) {
275 selectedItem.dragging = true
310 selectedItem.dragging = true
276− PopupUtils.close(quickListPopover)
311+ preDragging = false;
279 if (!selectedItem.dragging) {
314 if (!selectedItem.dragging) {
@@ -372,6 +407,7 @@ Item {
372 width: itemWidth
407 width: itemWidth
373 rotation: root.rotation
408 rotation: root.rotation
374 highlighted: true
409 highlighted: true