diff --git a/containment/contents/ui/VisibilityManager.qml b/containment/contents/ui/VisibilityManager.qml index c4e02f896..cefbefc2a 100644 --- a/containment/contents/ui/VisibilityManager.qml +++ b/containment/contents/ui/VisibilityManager.qml @@ -118,14 +118,12 @@ Item{ normalState = ((root.nowDockHoveredIndex === -1) && (layoutsContainer.hoveredIndex === -1) && (root.appletsAnimations === 0) - && (root.animationsNeedBothAxis === 0) && (root.animationsNeedLength === 0) - && (!mainLayout.animatedLength) ) || !windowSystem.compositingActive + && (root.animationsNeedBothAxis === 0) && (root.animationsNeedLength === 0)) || !windowSystem.compositingActive; // debug maskArea criteria //console.log(root.nowDockHoveredIndex + ", " + layoutsContainer.hoveredIndex + ", " // + root.appletsAnimations+ ", " - // + root.animationsNeedBothAxis + ", " + root.animationsNeedLength + ", " + root.animationsNeedThickness +", " - // + mainLayout.animatedLength); + // + root.animationsNeedBothAxis + ", " + root.animationsNeedLength + ", " + root.animationsNeedThickness); var tempLength = root.isHorizontal ? width : height; var tempThickness = root.isHorizontal ? height : width; @@ -192,8 +190,7 @@ Item{ tempLength = Screen.height; //screenGeometry.height; //grow only on length and not thickness - if(mainLayout.animatedLength || root.editMode - || (root.animationsNeedLength>0 && root.animationsNeedBothAxis === 0)) { + if(root.editMode || (root.animationsNeedLength>0 && root.animationsNeedBothAxis === 0)) { //this is used to fix a bug with shadow showing when the animation of edit mode //is triggered diff --git a/containment/contents/ui/main.qml b/containment/contents/ui/main.qml index dcb8561b7..dabd785b1 100644 --- a/containment/contents/ui/main.qml +++ b/containment/contents/ui/main.qml @@ -737,18 +737,6 @@ DragDrop.DropArea { } } - function checkLayoutsAnimatedLength() { - //After the last animations we must check again after a small delay in order - //to disable the automaticSizeUpdate - if (animatedLengthTimer.running) { - animatedLengthTimer.restart(); - } else { - animatedLengthTimer.start(); - } - - visibilityManager.updateMaskArea(); - } - function clearZoom(){ layoutsContainer.currentSpot = -1000; layoutsContainer.hoveredIndex = -1; @@ -883,7 +871,7 @@ DragDrop.DropArea { } function updateAutomaticIconSize() { - if (visibilityManager.normalState && !animatedLengthTimer.running && !root.editMode + if (visibilityManager.normalState && !root.editMode && (iconSize===plasmoid.configuration.iconSize || iconSize === automaticIconSizeBasedSize) ) { var layoutLength; var maxLength = dock.maxLength; @@ -1100,21 +1088,7 @@ DragDrop.DropArea { Layout.preferredWidth: width Layout.preferredHeight: height - property bool animatedLength: false property int count: children.length - - onHeightChanged: { - if (root.isVertical && !root.editMode) { - checkLayoutsAnimatedLength(); - } - } - - onWidthChanged: { - if (root.isHorizontal && !root.editMode) { - checkLayoutsAnimatedLength(); - } - } - } Grid{ @@ -1196,16 +1170,6 @@ DragDrop.DropArea { ///////////////END UI elements ///////////////BEGIN TIMER elements - Timer { - id: animatedLengthTimer - interval: 500 - onTriggered: { - if ((appletsAnimations === 0) && (root.animationsNeedLength === 0) && (root.animationsNeedBothAxis === 0)) { - mainLayout.animatedLength = false; - visibilityManager.updateMaskArea(); - } - } - } //Timer to check if the mouse is still inside the ListView Timer{ diff --git a/plasmoid/contents/ui/TaskDelegate.qml b/plasmoid/contents/ui/TaskDelegate.qml index 71a4c3757..255d0f47d 100644 --- a/plasmoid/contents/ui/TaskDelegate.qml +++ b/plasmoid/contents/ui/TaskDelegate.qml @@ -881,6 +881,8 @@ MouseArea{ id:showWindowAnimation property int speed: windowSystem.compositingActive ? root.durationTime* (1.2*units.longDuration) : 0 + ScriptAction{script:{root.signalAnimationsNeedLength(1)}} + PropertyAnimation { target: wrapper property: (icList.orientation == Qt.Vertical) ? "tempScaleHeight" : "tempScaleWidth" @@ -910,6 +912,8 @@ MouseArea{ } } + ScriptAction{script:{root.signalAnimationsNeedLength(-1)}} + onStopped: { if(mainItemContainer.isWindow || mainItemContainer.isStartup){ taskInitComponent.createObject(wrapper); @@ -918,19 +922,11 @@ MouseArea{ } } mainItemContainer.inAnimation = false; - - if (isWindow || isStartup) { - root.signalAnimationsNeedLength(-1); - } } function init(){ wrapper.tempScaleWidth = 0; wrapper.tempScaleHeight = 0; - - if (isWindow || isStartup) { - root.signalAnimationsNeedLength(1); - } } function showWindow(){