tasks:always finish bouncing animation

--more specific when a new window is added or
when the in attention bouncing animation is not
needed any more
work/usta_fix_ecm_version_check
Michail Vourlakos 3 years ago
parent 5100deee38
commit 4401fdbb0f

@ -102,7 +102,7 @@ Item {
State{ State{
name: "animating" name: "animating"
when: !taskItem.inAddRemoveAnimation && (launcherAnimation.running || newWindowAnimation.running || fastRestoreAnimation.running) when: !taskItem.inAddRemoveAnimation && (launcherAnimation.running || newWindowAnimation.running)
AnchorChanges{ AnchorChanges{
target: taskIconItem; target: taskIconItem;
@ -121,8 +121,6 @@ Item {
Transition{ Transition{
from: "animating" from: "animating"
to: "*" to: "*"
enabled: !fastRestoreAnimation.running
AnchorAnimation { duration: 1.5 * taskItem.abilities.animations.speedFactor.current * taskItem.abilities.animations.duration.large } AnchorAnimation { duration: 1.5 * taskItem.abilities.animations.speedFactor.current * taskItem.abilities.animations.duration.large }
} }
] ]
@ -438,8 +436,6 @@ Item {
TaskAnimations.NewWindowAnimation { id: newWindowAnimation } TaskAnimations.NewWindowAnimation { id: newWindowAnimation }
TaskAnimations.RemoveWindowFromGroupAnimation { id: removingAnimation } TaskAnimations.RemoveWindowFromGroupAnimation { id: removingAnimation }
TaskAnimations.FastRestoreAnimation { id: fastRestoreAnimation }
//! Animations //! Animations
Component.onDestruction: { Component.onDestruction: {

@ -28,9 +28,8 @@ AbilityItem.BasicItem {
isHidden: !visible || isForcedHidden isHidden: !visible || isForcedHidden
isHiddenSpacerForcedShow: taskItem.inAttentionBuiltinAnimation || taskItem.inFastRestoreAnimation isHiddenSpacerForcedShow: taskItem.inAttentionBuiltinAnimation
isHiddenSpacerAnimated: taskItem.inFastRestoreAnimation isHiddenSpacerAnimated: showWindowAnimation.running
|| showWindowAnimation.running
|| root.inActivityChange || root.inActivityChange
|| taskItem.inRemoveStage || taskItem.inRemoveStage
|| (taskItem.containsMouse && inAttentionBuiltinAnimation && taskItem.parabolicItem.zoom!==taskItem.abilities.parabolic.factor.zoom) || (taskItem.containsMouse && inAttentionBuiltinAnimation && taskItem.parabolicItem.zoom!==taskItem.abilities.parabolic.factor.zoom)
@ -56,7 +55,7 @@ AbilityItem.BasicItem {
|| !hoverEnabled || !hoverEnabled
|| !taskItem.abilities.myView.isShownFully || !taskItem.abilities.myView.isShownFully
|| inAnimation || inAnimation
|| (inBlockingAnimation && !(inAttentionBuiltinAnimation || inFastRestoreAnimation)) || (inBlockingAnimation && !inAttentionBuiltinAnimation)
parabolicItem.isUpdatingOnlySpacers: inAttentionBuiltinAnimation || inBouncingAnimation parabolicItem.isUpdatingOnlySpacers: inAttentionBuiltinAnimation || inBouncingAnimation
property alias hoverEnabled: taskMouseArea.hoverEnabled property alias hoverEnabled: taskMouseArea.hoverEnabled
@ -75,7 +74,6 @@ AbilityItem.BasicItem {
property bool inAttentionBuiltinAnimation: false property bool inAttentionBuiltinAnimation: false
property bool inBlockingAnimation: false property bool inBlockingAnimation: false
property bool inBouncingAnimation: false property bool inBouncingAnimation: false
property bool inFastRestoreAnimation: false
property bool inNewWindowBuiltinAnimation: false property bool inNewWindowBuiltinAnimation: false
property bool inPopup: false property bool inPopup: false
property bool inRemoveStage: false property bool inRemoveStage: false

@ -1,58 +0,0 @@
/*
SPDX-FileCopyrightText: 2016 Smith AR <audoban@openmailbox.org>
SPDX-FileCopyrightText: 2016 Michail Vourlakos <mvourlakos@gmail.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
import QtQuick 2.0
import org.kde.plasma.plasmoid 2.0
///////Restore Zoom Animation/////
SequentialAnimation{
id: fastRestoreAnimation
property int speed: 5*taskItem.animationTime
ScriptAction {
script: {
taskItem.inFastRestoreAnimation = true;
taskItem.inBlockingAnimation = true;
}
}
ParallelAnimation {
PropertyAnimation {
target: taskItem.parabolicItem
property: "zoom"
to: 1
duration: fastRestoreAnimation.speed
easing.type: Easing.InCubic
}
PropertyAnimation {
target: taskItem.parabolicItem
property: "zoomLength"
to: 1
duration: fastRestoreAnimation.speed
easing.type: Easing.InCubic
}
PropertyAnimation {
target: taskItem.parabolicItem
property: "zoomThickness"
to: 1
duration: fastRestoreAnimation.speed
easing.type: Easing.InCubic
}
}
onStopped: {
newWindowAnimation.stop();
taskItem.inBlockingAnimation = false;
taskItem.inFastRestoreAnimation = false;
// console.log("Fast Restore Animation ended...");
}
}

@ -16,6 +16,7 @@ Item{
property int speed: 0.9 * taskItem.abilities.animations.speedFactor.current * taskItem.abilities.animations.duration.large property int speed: 0.9 * taskItem.abilities.animations.speedFactor.current * taskItem.abilities.animations.duration.large
readonly property bool running: launcherAnimationLoader.item ? launcherAnimationLoader.item.running : false readonly property bool running: launcherAnimationLoader.item ? launcherAnimationLoader.item.running : false
readonly property bool paused: launcherAnimationLoader.active ? launcherAnimationLoader.item.paused : false
readonly property string needThicknessEvent: launcherAnimation + "_launcher" readonly property string needThicknessEvent: launcherAnimation + "_launcher"

@ -21,6 +21,7 @@ Item{
property bool inDelayedStartup: false property bool inDelayedStartup: false
readonly property bool running: newWindowAnimationLoader.active ? newWindowAnimationLoader.item.running : false readonly property bool running: newWindowAnimationLoader.active ? newWindowAnimationLoader.item.running : false
readonly property bool paused: newWindowAnimationLoader.active ? newWindowAnimationLoader.item.paused : false
readonly property string needThicknessEvent: newWindowAnimation + "_newwindow" readonly property string needThicknessEvent: newWindowAnimation + "_newwindow"
Loader { Loader {
@ -42,8 +43,7 @@ Item{
onInAttentionChanged:{ onInAttentionChanged:{
if (!taskItem.inAttention && newWindowAnimation.running && taskItem.inAttentionBuiltinAnimation) { if (!taskItem.inAttention && newWindowAnimation.running && taskItem.inAttentionBuiltinAnimation) {
newWindowAnimation.pause(); clear();
fastRestoreAnimation.start();
} }
} }
} }
@ -55,12 +55,6 @@ Item{
taskItem.inNewWindowBuiltinAnimation = false; taskItem.inNewWindowBuiltinAnimation = false;
} }
function pause() {
if (running) {
newWindowAnimationLoader.item.pause();
}
}
function stop() { function stop() {
if (running) { if (running) {
clear(); clear();

@ -8,7 +8,6 @@ import QtQuick 2.0
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
SequentialAnimation{ SequentialAnimation{
alwaysRunToEnd: true
loops: newWindowAnimation.isDemandingAttention ? 20 : 1 loops: newWindowAnimation.isDemandingAttention ? 20 : 1
readonly property string bouncePropertyName: taskItem.isVertical ? "iconAnimatedOffsetX" : "iconAnimatedOffsetY" readonly property string bouncePropertyName: taskItem.isVertical ? "iconAnimatedOffsetX" : "iconAnimatedOffsetY"
@ -30,7 +29,6 @@ SequentialAnimation{
} }
} }
ParallelAnimation {
PropertyAnimation { PropertyAnimation {
target: taskItem target: taskItem
property: bouncePropertyName property: bouncePropertyName
@ -38,7 +36,6 @@ SequentialAnimation{
duration: newWindowAnimation.speed duration: newWindowAnimation.speed
easing.type: Easing.OutQuad easing.type: Easing.OutQuad
} }
}
PropertyAnimation { PropertyAnimation {
target: taskItem target: taskItem

Loading…
Cancel
Save