From e6d87a0097adbc14ec0de75cfd81efae661c7c18 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Thu, 12 Jul 2018 10:35:15 +0300 Subject: [PATCH] fix for filtering tasks based on launchers --- .../animations/TaskRealRemovalAnimation.qml | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/plasmoid/package/contents/ui/task/animations/TaskRealRemovalAnimation.qml b/plasmoid/package/contents/ui/task/animations/TaskRealRemovalAnimation.qml index 71225af47..62257ecf7 100644 --- a/plasmoid/package/contents/ui/task/animations/TaskRealRemovalAnimation.qml +++ b/plasmoid/package/contents/ui/task/animations/TaskRealRemovalAnimation.qml @@ -27,12 +27,14 @@ import org.kde.latte 0.1 as Latte SequentialAnimation { id: taskRealRemovalAnimation PropertyAction { target: mainItemContainer; property: "ListView.delayRemove"; value: true } + PropertyAction { target: mainItemContainer; property: "inAnimation"; value: true } + PropertyAction { target: mainItemContainer; property: "inAddRemoveAnimation"; value: true } PropertyAction { target: mainItemContainer; property: "inRemoveStage"; value: true } //Animation Add/Remove (1) - when is window with no launcher, animations enabled //Animation Add/Remove (4) - the user removes a launcher, animation enabled - property bool animation1: ((((tasksModel.launcherPosition(mainItemContainer.launcherUrl) == -1) - && (tasksModel.launcherPosition(mainItemContainer.launcherUrlWithIcon) == -1) ) + property bool animation1: ((((tasksModel.launcherPosition(mainItemContainer.launcherUrl) === -1) + && (tasksModel.launcherPosition(mainItemContainer.launcherUrlWithIcon) === -1) ) || !launcherIsPresent(mainItemContainer.launcherUrl)) && !mainItemContainer.isStartup && Latte.WindowSystem.compositingActive) @@ -42,13 +44,10 @@ SequentialAnimation { property bool enabledAnimation: (animation1 || animation4) && (root.durationTime !== 0) && !mainItemContainer.inBouncingAnimation - && !mainItemContainer.isSeparator; + && !mainItemContainer.isSeparator + && mainItemContainer.visible; ScriptAction{ script:{ - mainItemContainer.inAnimation = true; - mainItemContainer.inAddRemoveAnimation = true; - mainItemContainer.inRemoveStage = true; - //! When a window is removed and afterwards its launcher must be shown immediately! if (!enabledAnimation && mainItemContainer.isWindow && !mainItemContainer.isSeparator && tasksModel.launcherPosition(mainItemContainer.launcherUrl) !== -1 @@ -139,7 +138,7 @@ SequentialAnimation { PropertyAnimation { target: wrapper - property: (icList.orientation == Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight" + property: (icList.orientation === Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight" to: 0 duration: taskRealRemovalAnimation.enabledAnimation ? 1.35*showWindowAnimation.speed : 0 easing.type: Easing.InQuad @@ -149,7 +148,7 @@ SequentialAnimation { //smooth move into place the surrounding tasks PropertyAnimation { target: wrapper - property: (icList.orientation == Qt.Vertical) ? "tempScaleHeight" : "tempScaleWidth" + property: (icList.orientation === Qt.Vertical) ? "tempScaleHeight" : "tempScaleWidth" to: 0 duration: taskRealRemovalAnimation.enabledAnimation ? 1.35*showWindowAnimation.speed : 0 easing.type: Easing.InQuad @@ -165,8 +164,6 @@ SequentialAnimation { root.signalAnimationsNeedLength(-1); - mainItemContainer.inAnimation = false; - if(mainItemContainer.launcherUrl===root.launcherForRemoval && mainItemContainer.isLauncher) root.launcherForRemoval=""; @@ -185,14 +182,19 @@ SequentialAnimation { } } + mainItemContainer.visible = false; + //send signal that the launcher is really removing if (mainItemContainer.inBouncingAnimation) { - mainItemContainer.visible = false; root.removeWaitingLauncher(mainItemContainer.launcherUrl); root.setGlobalDirectRender(false); } } } + PropertyAction { target: mainItemContainer; property: "inAnimation"; value: false } + PropertyAction { target: mainItemContainer; property: "inAddRemoveAnimation"; value: false } + PropertyAction { target: mainItemContainer; property: "inRemoveStage"; value: false } + PropertyAction { target: mainItemContainer; property: "ListView.delayRemove"; value: false } }