1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-08-21 13:49:29 +03:00

fixes for tasks bouncing state

--more specific when they demand attention
This commit is contained in:
Michail Vourlakos
2021-02-07 02:43:28 +02:00
parent b5021d1cc7
commit 20c704fae7
2 changed files with 17 additions and 8 deletions

View File

@ -32,6 +32,8 @@ Item{
property bool isDemandingAttention: taskItem.inAttention
property bool containsMouse: taskItem.containsMouse
property bool inDelayedStartup: false
readonly property bool running: newWindowAnimationLoader.active ? newWindowAnimationLoader.item.running : false
readonly property string needThicknessEvent: newWindowAnimation + "_newwindow"
@ -50,7 +52,6 @@ Item{
}
function clear(){
newWindowAnimationLoader.item.loops = 1;
newWindowAnimationLoader.item.stop();
taskItem.parabolicItem.zoomLength = 1.0;
@ -86,12 +87,7 @@ Item{
taskItem.parabolicItem.zoomLength = taskItem.parabolicItem.zoom;
taskItem.parabolicItem.zoomThickness = taskItem.parabolicItem.zoom;
if(!isDemandingAttention)
newWindowAnimationLoader.item.loops = 1;
else {
newWindowAnimationLoader.item.loops = 20;
taskItem.inAttentionAnimation = true;
}
taskItem.inAttentionAnimation = isDemandingAttention;
taskItem.abilities.animations.needThickness.addEvent(needThicknessEvent);
}
@ -101,7 +97,12 @@ Item{
&& ((root.windowInAttentionEnabled && isDemandingAttention)
|| root.windowAddedInGroupEnabled)){
newWindowAnimation.init();
newWindowAnimationLoader.item.start();
if (!newWindowAnimation.active) {
inDelayedStartup = true;
} else {
newWindowAnimationLoader.item.start();
}
}
}

View File

@ -23,6 +23,14 @@ import org.kde.plasma.plasmoid 2.0
SequentialAnimation{
alwaysRunToEnd: true
loops: newWindowAnimation.isDemandingAttention ? 20 : 1
Component.onCompleted: {
if (newWindowAnimation.inDelayedStartup) {
newWindowAnimation.inDelayedStartup = false;
start();
}
}
ParallelAnimation{
PropertyAnimation {