Commit ea01f911 authored by Marco Martin's avatar Marco Martin

remove click feedback anim

parent 91c92f8f
......@@ -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);
......
......@@ -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) {
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment