From 15cff730ab66a78d73cb7c0bd3dfde04c033153b Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 4 Feb 2018 19:24:52 +0200 Subject: [PATCH] stop restoreAnimation in directRendering --issue #852, when directRendering is activated some of the tasks could be in restoreAnimation, in such case they stop their animation are moved to directRendering mode --- .../package/contents/ui/applet/AppletItem.qml | 15 +++++++++------ containment/package/contents/ui/main.qml | 14 ++++++++------ .../package/contents/ui/task/TaskDelegate.qml | 8 ++++++++ 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/containment/package/contents/ui/applet/AppletItem.qml b/containment/package/contents/ui/applet/AppletItem.qml index 3658fa317..37246b4b9 100644 --- a/containment/package/contents/ui/applet/AppletItem.qml +++ b/containment/package/contents/ui/applet/AppletItem.qml @@ -221,11 +221,6 @@ Item { } else { restoreAnimation.start(); } - - //if (restoreAnimation) - // restoreAnimation.start(); - // if(wrapper) - // wrapper.zoomScale = 1; } function checkCanBeHovered(){ @@ -386,6 +381,15 @@ Item { Connections{ target: root + + onGlobalDirectRenderChanged:{ + if (root.globalDirectRender && restoreAnimation.running) { + // console.log("CLEAR APPLET SCALE !!!!"); + restoreAnimation.stop(); + wrapper.zoomScale = 1; + } + } + onLatteAppletHoveredIndexChanged: { if ( (root.zoomFactor>1) && (root.latteAppletHoveredIndex >= 0) ){ var distance = 2; @@ -677,7 +681,6 @@ Item { ] //END states - //BEGIN animations ///////Restore Zoom Animation///// ParallelAnimation{ diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index 3730ff764..6a9ef9c9f 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -249,7 +249,7 @@ DragDrop.DropArea { Latte.Dock.Center : plasmoid.configuration.panelPosition ) property real zoomFactor: (Latte.WindowSystem.compositingActive && durationTime>0) ? ( 1 + (plasmoid.configuration.zoomLevel / 20) ) : 1 - property real midZoomFactor: (1 + (zoomFactor-1)/3) + property real midZoomFactor: 1 //(1 + (zoomFactor-1)/3) readonly property string plasmoidName: "org.kde.latte.plasmoid" @@ -1088,7 +1088,13 @@ DragDrop.DropArea { if (latteApplet && latteApplet.waitingLaunchers.length > 0) return; - root.globalDirectRender = value; + if (value === true) { + if (dockContainsMouse && !rootMouseArea.containsMouse) { + root.globalDirectRender = true; + } + } else { + root.globalDirectRender = false; + } } function updateAutomaticIconSize() { @@ -1374,10 +1380,6 @@ DragDrop.DropArea { onTriggered: { if (!titleTooltipDialog.activeItemHovered) { titleTooltipDialog.visible = false; - if (dock && dock.visibility && !dock.visibility.containsMouse) { - enableDirectRenderTimer.stop(); - setGlobalDirectRender(false); - } } if (root.debugModeTimers) { diff --git a/plasmoid/package/contents/ui/task/TaskDelegate.qml b/plasmoid/package/contents/ui/task/TaskDelegate.qml index 566bb5e08..c369cb6e4 100644 --- a/plasmoid/package/contents/ui/task/TaskDelegate.qml +++ b/plasmoid/package/contents/ui/task/TaskDelegate.qml @@ -323,6 +323,14 @@ MouseArea{ } } onSeparatorsUpdated: separatorItem.updateForceHiddenState(); + + onGlobalDirectRenderChanged:{ + if (root.globalDirectRender && restoreAnimation.running) { + // console.log("CLEAR TASK SCALE !!!!"); + restoreAnimation.stop(); + wrapper.mScale = 1; + } + } } Rectangle {