From c07f8e3c61062a9cf880e2b0fc0329b1683d2305 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Fri, 3 Feb 2017 22:59:32 +0200 Subject: [PATCH] fix #119 ,improve animations heuristics --this should fix also the case that only applets are animating and need more length from the mask --- containment/contents/ui/main.qml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/containment/contents/ui/main.qml b/containment/contents/ui/main.qml index db326a34e..7370bab2f 100644 --- a/containment/contents/ui/main.qml +++ b/containment/contents/ui/main.qml @@ -1131,6 +1131,7 @@ DragDrop.DropArea { root.maxLength : parent.height z:10 + property bool animationSent: false property bool shouldCheckHalfs: (plasmoid.configuration.panelPosition === Latte.Dock.Justify) && (mainLayout.children>1) property int contentsWidth: startLayout.width + mainLayout.width + endLayout.width @@ -1149,6 +1150,13 @@ DragDrop.DropArea { if (dock && ((contentsWidth >= root.maxLength) || firstHalfExited || secondHalfExited)) { updateAutomaticIconSize(); } + + if (!animationSent) { + animationSent = true; + slotAnimationsNeedLength(1); + } + + delayUpdateMaskArea.start(); } } @@ -1165,6 +1173,13 @@ DragDrop.DropArea { if (dock && ((contentsHeight >= root.maxLength) || firstHalfExited || secondHalfExited)) { updateAutomaticIconSize(); } + + if (!animationSent) { + animationSent = true; + slotAnimationsNeedLength(1); + } + + delayUpdateMaskArea.start(); } } @@ -1354,6 +1369,11 @@ DragDrop.DropArea { interval:300; onTriggered: { + if (layoutsContainer.animationSent) { + root.slotAnimationsNeedLength(-1); + layoutsContainer.animationSent = false; + } + visibilityManager.updateMaskArea(); } }