From 5ad5620e4edfb9344a760c731ead664edfe6ebea Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Mon, 25 Dec 2017 16:18:52 +0200 Subject: [PATCH] dont animate task additions after dragging --- plasmoid/package/contents/ui/main.qml | 13 ++++++++++++- .../ui/task/animations/TaskShowWindowAnimation.qml | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index 9820a0dc3..de3d04ba2 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -64,6 +64,7 @@ Item { property bool dropNewLauncher: false readonly property bool hasInternalSeparator: parabolicManager.hasInternalSeparator property bool inActivityChange: false + property bool inDraggingPhase: false property bool initializationStep: false //true property bool initializatedBuffers: true // noInitCreatedBuffers >= tasksStarting ? true : false property bool isHovered: false @@ -337,6 +338,7 @@ Item { onDragSourceChanged: { if (dragSource == null) { + restoreDraggingPhaseTimer.start(); root.draggingFinished(); root.signalActionsBlockHiding(-1); //root.signalDraggingState(false); @@ -344,6 +346,7 @@ Item { //updateLaunchersNewArchitecture(); tasksModel.syncLaunchers(); } else { + inDraggingPhase = true; root.signalActionsBlockHiding(1); //root.signalDraggingState(true); } @@ -840,7 +843,15 @@ Item { } } - + //this timer restores the draggingPhase flag to false + //after a dragging has finished... This delay is needed + //in order to not animate any tasks are added after a + //dragging + Timer { + id: restoreDraggingPhaseTimer + interval: 150 + onTriggered: inDraggingPhase = false; + } ///Red Liner!!! show the upper needed limit for annimations Rectangle{ diff --git a/plasmoid/package/contents/ui/task/animations/TaskShowWindowAnimation.qml b/plasmoid/package/contents/ui/task/animations/TaskShowWindowAnimation.qml index 540a14436..7109293f6 100644 --- a/plasmoid/package/contents/ui/task/animations/TaskShowWindowAnimation.qml +++ b/plasmoid/package/contents/ui/task/animations/TaskShowWindowAnimation.qml @@ -135,7 +135,7 @@ SequentialAnimation{ || !launcherIsPresent(mainItemContainer.launcherUrl)) && mainItemContainer.isStartup); - if (!Latte.WindowSystem.compositingActive) { + if (!Latte.WindowSystem.compositingActive || root.inDraggingPhase) { mainItemContainer.visible = true; wrapper.tempScaleWidth = 1; wrapper.tempScaleHeight = 1;