|
|
|
@ -23,34 +23,55 @@ import QtQuick 2.0
|
|
|
|
|
import org.kde.plasma.plasmoid 2.0
|
|
|
|
|
|
|
|
|
|
///////Restore Zoom Animation/////
|
|
|
|
|
ParallelAnimation{
|
|
|
|
|
SequentialAnimation{
|
|
|
|
|
id: restoreAnimation
|
|
|
|
|
|
|
|
|
|
PropertyAnimation {
|
|
|
|
|
target: wrapper
|
|
|
|
|
property: "mScale"
|
|
|
|
|
to: 1
|
|
|
|
|
duration: 4 * mainItemContainer.animationTime
|
|
|
|
|
easing.type: Easing.InCubic
|
|
|
|
|
}
|
|
|
|
|
ParallelAnimation{
|
|
|
|
|
PropertyAnimation {
|
|
|
|
|
target: wrapper
|
|
|
|
|
property: "mScale"
|
|
|
|
|
to: 1
|
|
|
|
|
duration: 4 * mainItemContainer.animationTime
|
|
|
|
|
easing.type: Easing.InCubic
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PropertyAnimation {
|
|
|
|
|
target: hiddenSpacerLeft
|
|
|
|
|
property: "nScale"
|
|
|
|
|
to: 0
|
|
|
|
|
duration: 4 * mainItemContainer.animationTime
|
|
|
|
|
easing.type: Easing.InCubic
|
|
|
|
|
}
|
|
|
|
|
PropertyAnimation {
|
|
|
|
|
target: hiddenSpacerLeft
|
|
|
|
|
property: "nScale"
|
|
|
|
|
to: 0
|
|
|
|
|
duration: 4 * mainItemContainer.animationTime
|
|
|
|
|
easing.type: Easing.InCubic
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PropertyAnimation {
|
|
|
|
|
target: hiddenSpacerRight
|
|
|
|
|
property: "nScale"
|
|
|
|
|
to: 0
|
|
|
|
|
duration: 4 * mainItemContainer.animationTime
|
|
|
|
|
easing.type: Easing.InCubic
|
|
|
|
|
PropertyAnimation {
|
|
|
|
|
target: hiddenSpacerRight
|
|
|
|
|
property: "nScale"
|
|
|
|
|
to: 0
|
|
|
|
|
duration: 4 * mainItemContainer.animationTime
|
|
|
|
|
easing.type: Easing.InCubic
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//! debug code based on third task
|
|
|
|
|
/*ScriptAction{
|
|
|
|
|
script: {
|
|
|
|
|
if (index===2) {
|
|
|
|
|
console.log("restore script ended correctly...");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onStarted: {
|
|
|
|
|
// console.log("restore animation started...");
|
|
|
|
|
if (index === 2)
|
|
|
|
|
console.log("restore animation started...");
|
|
|
|
|
} */
|
|
|
|
|
|
|
|
|
|
onStopped: {
|
|
|
|
|
//! VERY IMPORTANT CODE, fixes a bug when cycling the mouse very fast inside
|
|
|
|
|
//! and outside the dock, in some rare cases the restoreAnimation didnt end!!
|
|
|
|
|
if (latteDock && (!latteDock.dockContainsMouse || icList.hoveredIndex === -1)) {
|
|
|
|
|
wrapper.mScale = 1;
|
|
|
|
|
}
|
|
|
|
|
// if (index === 2)
|
|
|
|
|
// console.log("restore animation stopped... ind:"+index+" zoom:"+wrapper.mScale);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|