diff --git a/containments/homescreen/package/contents/ui/launcher/Delegate.qml b/containments/homescreen/package/contents/ui/launcher/Delegate.qml index 28d18cbe..cf7ef2f5 100644 --- a/containments/homescreen/package/contents/ui/launcher/Delegate.qml +++ b/containments/homescreen/package/contents/ui/launcher/Delegate.qml @@ -45,6 +45,7 @@ ContainmentLayoutManager.ItemContainer { key: model.ApplicationStorageIdRole property real dragCenterX property real dragCenterY + property alias iconItem: icon editModeCondition: ContainmentLayoutManager.ItemContainer.AfterPressAndHold @@ -92,9 +93,6 @@ ContainmentLayoutManager.ItemContainer { contentItem: MouseArea { onClicked: { - clickFedbackAnimation.target = delegate; - clickFedbackAnimation.running = true; - delegate.launch(delegate.x + (units.smallSpacing * 2), delegate.y + (units.smallSpacing * 2), icon.source, modelData.ApplicationNameRole) plasmoid.nativeInterface.applicationListModel.runApplication(modelData.ApplicationStorageIdRole); diff --git a/containments/homescreen/package/contents/ui/launcher/LauncherGrid.qml b/containments/homescreen/package/contents/ui/launcher/LauncherGrid.qml index 308ba542..eb783900 100644 --- a/containments/homescreen/package/contents/ui/launcher/LauncherGrid.qml +++ b/containments/homescreen/package/contents/ui/launcher/LauncherGrid.qml @@ -41,67 +41,6 @@ LauncherContainer { frame.width: width - PlasmaCore.IconItem { - id: effect - height: 64 - width: 64 - visible: false - x: 0 - y: 0 - - source: "pattern-kde" - property string title - - SequentialAnimation { - id: woosh - ScriptAction { - script: effect.visible = true - } - ParallelAnimation { - NumberAnimation { - target: effect - property: "opacity" - from: 0.9 - to: 0 - duration: 200 - } - NumberAnimation { - target: effect - property: "scale" - from: 1 - to: 3 - duration: 200 - } - ScriptAction { - script: { - effect.grabToImage((img) => { - NanoShell.StartupFeedback.open( - effect.source, - effect.title, - ColourAverage.averageColour(img.image), - effect.Kirigami.ScenePosition.x, - effect.Kirigami.ScenePosition.y, - effect.width, - effect.height); - }) - } - } - } - ScriptAction { - script: effect.visible = false - } - } - - function swoosh(x, y, sauce, title) { - effect.x = x - effect.y = y - effect.source = sauce - effect.visible = true - effect.title = title - woosh.restart() - } - } - Repeater { parent: root.flow model: plasmoid.nativeInterface.applicationListModel @@ -126,9 +65,16 @@ LauncherContainer { appletsLayout.restoreItem(delegate); } } - onLaunch: (a, b, c, d) => { - print(a,b,c,d) - effect.swoosh(a, b, c, d) + onLaunch: (x, y, icon, title) => { + delegate.grabToImage((img) => { + NanoShell.StartupFeedback.open( + icon, + title, + ColourAverage.averageColour(img.image), + delegate.iconItem.Kirigami.ScenePosition.x + delegate.iconItem.width/2, + delegate.iconItem.Kirigami.ScenePosition.y + delegate.iconItem.height/2, + Math.min(delegate.iconItem.width, delegate.iconItem.height)); + }); } onParentFromLocationChanged: { if (!launcherDragManager.active && parent != parentFromLocation) { diff --git a/containments/homescreen/package/contents/ui/main.qml b/containments/homescreen/package/contents/ui/main.qml index cbd0201b..511a665f 100644 --- a/containments/homescreen/package/contents/ui/main.qml +++ b/containments/homescreen/package/contents/ui/main.qml @@ -101,28 +101,6 @@ Item { } } - SequentialAnimation { - id: clickFedbackAnimation - property Item target - NumberAnimation { - target: clickFedbackAnimation.target - properties: "scale" - to: 2 - duration: units.longDuration - easing.type: Easing.InOutQuad - } - PauseAnimation { - duration: units.shortDuration - } - NumberAnimation { - target: clickFedbackAnimation.target - properties: "scale" - to: 1 - duration: units.longDuration - easing.type: Easing.InOutQuad - } - } - Launcher.LauncherDragManager { id: launcherDragManager anchors.fill: parent