diff --git a/containment/contents/ui/VisibilityManager.qml b/containment/contents/ui/VisibilityManager.qml index 7ccb99a67..eadc9ac1f 100644 --- a/containment/contents/ui/VisibilityManager.qml +++ b/containment/contents/ui/VisibilityManager.qml @@ -91,7 +91,7 @@ Item{ } function slotMustBeShown() { - console.log("show..."); + // console.log("show..."); slidingAnimationAutoHiddenIn.init(); } @@ -100,7 +100,7 @@ Item{ } function slotMustBeHide() { - console.log("hide...."); + // console.log("hide...."); slidingAnimationAutoHiddenOut.init(); } @@ -125,7 +125,7 @@ Item{ && (!mainLayout.animatedLength) // debug maskArea criteria - // console.log(root.nowDockHoveredIndex + ", " + layoutsContainer.hoveredIndex + ", " + //console.log(root.nowDockHoveredIndex + ", " + layoutsContainer.hoveredIndex + ", " // + root.appletsAnimations+ ", " // + root.animationsNeedBothAxis + ", " + root.animationsNeedLength + ", " + root.animationsNeedThickness +", " // + mainLayout.animatedLength); @@ -136,6 +136,7 @@ Item{ var space = root.panelEdgeSpacing + 10; if (normalState && plasmoid.immutable) { + //console.log("entered normal state..."); //count panel length if(root.isHorizontal) { tempLength = plasmoid.configuration.panelPosition === Latte.Dock.Double ? layoutsContainer.width + 0.5*space : mainLayout.width + space; @@ -194,7 +195,8 @@ Item{ tempLength = Screen.height; //screenGeometry.height; //grow only on length and not thickness - if(mainLayout.animatedLength || !plasmoid.immutable) { + if(mainLayout.animatedLength || !plasmoid.immutable + || (root.animationsNeedLength>0 && root.animationsNeedBothAxis === 0)) { tempThickness = thicknessNormalOriginal; if (root.animationsNeedThickness > 0) { diff --git a/containment/contents/ui/main.qml b/containment/contents/ui/main.qml index 443e179ab..9e94b37ec 100644 --- a/containment/contents/ui/main.qml +++ b/containment/contents/ui/main.qml @@ -386,7 +386,7 @@ DragDrop.DropArea { //// END OF Behaviors //////////////START OF CONNECTIONS - onAppletsAnimationsChanged: visibilityManager.updateMaskArea(); + // onAppletsAnimationsChanged: visibilityManager.updateMaskArea(); onDockChanged: { if (dock) { @@ -752,12 +752,12 @@ DragDrop.DropArea { animatedLengthTimer.start(); } - if (!dock.visibility.containsMouse && (root.animationsNeedBothAxis === 0) + /* if (!dock.visibility.containsMouse && (root.animationsNeedBothAxis === 0) && (root.animationsNeedLength===0) && (root.appletsAnimations === 0)) { mainLayout.animatedLength = true; } else { mainLayout.animatedLength = false; - } + }*/ visibilityManager.updateMaskArea(); } @@ -1271,7 +1271,7 @@ DragDrop.DropArea { Timer { id: animatedLengthTimer - interval: 150 + interval: 500 onTriggered: { // if (!magicWin.isHovered && (appletsAnimations === 0) // && (root.animationsNeedLength === 0) && (root.animationsNeedBothAxis === 0)) { diff --git a/plasmoid/contents/ui/TaskDelegate.qml b/plasmoid/contents/ui/TaskDelegate.qml index 38d921375..b8fe1921d 100644 --- a/plasmoid/contents/ui/TaskDelegate.qml +++ b/plasmoid/contents/ui/TaskDelegate.qml @@ -378,16 +378,14 @@ MouseArea{ function sendEndOfNeedBothAxisAnimation(){ if (mainItemContainer.isZoomed) { mainItemContainer.isZoomed = false; - if (panel.animationsNeedBothAxis > 0) { - panel.setAnimationsNeedBothAxis(panel.animationsNeedBothAxis - 1); - } + panel.setAnimationsNeedBothAxis(-1); } } onScaleChanged: { if ((scale > 1) && !mainItemContainer.isZoomed) { mainItemContainer.isZoomed = true; - panel.setAnimationsNeedBothAxis(panel.animationsNeedBothAxis + 1); + panel.setAnimationsNeedBothAxis(1); } else if ((scale == 1) && mainItemContainer.isZoomed) { sendEndOfNeedBothAxisAnimation(); } @@ -918,11 +916,19 @@ MouseArea{ } } mainItemContainer.inAnimation = false; + + if (isWindow || isStartup) { + panel.setAnimationsNeedLength(-1); + } } function init(){ wrapper.tempScaleWidth = 0; wrapper.tempScaleHeight = 0; + + if (isWindow || isStartup) { + panel.setAnimationsNeedLength(1); + } } function showWindow(){ @@ -1070,6 +1076,9 @@ MouseArea{ PropertyAction { target: mainItemContainer; property: "inAnimation"; value: false } PropertyAction { target: mainItemContainer; property: "ListView.delayRemove"; value: false } PropertyAction { target: icList; property: "delayingRemoval"; value: false } + + onStarted: panel.setAnimationsNeedLength(+1); + onStopped: panel.setAnimationsNeedLength(-1); } }// main Item diff --git a/plasmoid/contents/ui/TaskIconItem.qml b/plasmoid/contents/ui/TaskIconItem.qml index cd7dba934..e12d39301 100644 --- a/plasmoid/contents/ui/TaskIconItem.qml +++ b/plasmoid/contents/ui/TaskIconItem.qml @@ -474,8 +474,8 @@ Item{ panel.noTasksInAnimation--; } - if ( launchedAlready && panel.animationsNeedThickness>0 ) { - panel.setAnimationsNeedThickness( panel.animationsNeedThickness-1 ); + if ( launchedAlready ) { + panel.setAnimationsNeedThickness(-1); } launchedAlready = false; @@ -485,7 +485,7 @@ Item{ //console.log ("Nooo 1 : "+panel.noTasksInAnimation); if(!launchedAlready) { launchedAlready = true; - panel.setAnimationsNeedThickness( panel.animationsNeedThickness+1 ); + panel.setAnimationsNeedThickness(1); panel.noTasksInAnimation++; mainItemContainer.setBlockingAnimation(true); } @@ -582,9 +582,7 @@ Item{ function sendEndOfNeedThicknessAnimation(){ if (needsThicknessSent) { needsThicknessSent = false; - if (panel.animationsNeedThickness > 0) { - panel.setAnimationsNeedThickness( panel.animationsNeedThickness-1 ); - } + panel.setAnimationsNeedThickness(-1); } } @@ -599,7 +597,7 @@ Item{ if (!needsThicknessSent) { needsThicknessSent = true; - panel.setAnimationsNeedThickness( panel.animationsNeedThickness+1 ); + panel.setAnimationsNeedThickness(1); } // icList.hoveredIndex = -1; diff --git a/plasmoid/contents/ui/main.qml b/plasmoid/contents/ui/main.qml index 984f6dff0..319bde3bb 100644 --- a/plasmoid/contents/ui/main.qml +++ b/plasmoid/contents/ui/main.qml @@ -163,28 +163,42 @@ Item { onGroupingLauncherUrlBlacklistChanged: tasksModel.groupingLauncherUrlBlacklist = plasmoid.configuration.groupingLauncherUrlBlacklist; } - function setAnimationsNeedBothAxis(value) { - if (value === animationsNeedBothAxis) { + function setAnimationsNeedBothAxis(step) { + if ((step === 0) || (plasmoid.configuration.durationTime ===0)) { return; } - animationsNeedBothAxis = value; + animationsNeedBothAxis = animationsNeedBothAxis + step; + if (animationsNeedBothAxis < 0) { + animationsNeedBothAxis = 0; + } + signalAnimationsNeedBothAxis(animationsNeedBothAxis); } - function setAnimationsNeedLength(value) { - if (value === animationsNeedLength) { + function setAnimationsNeedLength(step) { + if ((step === 0) || (plasmoid.configuration.durationTime ===0)) { return; } - animationsNeedLength = value; + + animationsNeedLength = animationsNeedLength + step; + if (animationsNeedLength < 0) { + animationsNeedLength = 0; + } + signalAnimationsNeedLength(animationsNeedLength); } - function setAnimationsNeedThickness(value) { - if (value === animationsNeedThickness) { + function setAnimationsNeedThickness(step) { + if ((step === 0) || (plasmoid.configuration.durationTime ===0)) { return; } - animationsNeedThickness = value; + + animationsNeedThickness = animationsNeedThickness + step; + if (animationsNeedThickness < 0) { + animationsNeedThickness = 0; + } + signalAnimationsNeedThickness(animationsNeedThickness); }