diff --git a/containments/homescreen/contents/ui/HomeLauncher.qml b/containments/homescreen/contents/ui/HomeLauncher.qml index b755c206..a12fecef 100644 --- a/containments/homescreen/contents/ui/HomeLauncher.qml +++ b/containments/homescreen/contents/ui/HomeLauncher.qml @@ -12,19 +12,7 @@ Item { property bool isDropTarget: delegateRoot != dragDelegate && root.reorderingApps && applicationsView.dragData && applicationsView.dragData.ApplicationStorageIdRole == modelData.ApplicationStorageIdRole opacity: isDropTarget ? 0.3 : 1 - - /*function syncDropTarget() { - if (isDropTarget) { - var pos = mapToItem(root, x, y); - dragDelegate.xTarget = pos.x; - dragDelegate.yTarget = pos.y; - print("AAAAA"+pos.x+" "+pos.x+" "+delegateRoot) - } - } - onIsDropTargetChanged: syncDropTarget(); - onXChanged: syncDropTarget(); - onYChanged: syncDropTarget();*/ - +onModelDataChanged:print("AAAA"); PlasmaCore.IconItem { id: icon anchors.centerIn: parent diff --git a/containments/homescreen/contents/ui/main.qml b/containments/homescreen/contents/ui/main.qml index 78febd21..8a34a15a 100644 --- a/containments/homescreen/contents/ui/main.qml +++ b/containments/homescreen/contents/ui/main.qml @@ -228,9 +228,11 @@ MouseEventListener { } onReleased: { applicationsView.interactive = true; - dragDelegate.xTarget = Math.floor(mouse.x / root.buttonHeight) * root.buttonHeight - dragDelegate.yTarget = Math.floor(mouse.y / root.buttonHeight) * root.buttonHeight + dragDelegate.xTarget = Math.floor(mouse.x / root.buttonHeight) * root.buttonHeight; + dragDelegate.yTarget = Math.floor(mouse.y / root.buttonHeight) * root.buttonHeight; dragDelegate.opacity = 0; + dragDelegate.modelData.ApplicationIconRole = ""; + dragDelegate.modelDataChanged(); applicationsView.dragData = null; root.reorderingApps = false; applicationsView.forceLayout(); @@ -403,7 +405,10 @@ MouseEventListener { property int margin: stripe.height + units.gridUnit * 2 onPressAndHold: { - plasmoid.action("configure").trigger(); + print(favoritesView.contains(mapToItem(favoritesView, mouse.x, mouse.y))) + if (!favoritesView.contains(mapToItem(favoritesView, mouse.x, mouse.y))) { + plasmoid.action("configure").trigger(); + } } ColumnLayout {