From c129743aa94a4725792c2609e954c81401e9c5b2 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos <mvourlakos@gmail.com> Date: Mon, 5 Feb 2018 18:43:49 +0200 Subject: [PATCH] use a new zoom-in animation type --- .../package/contents/ui/applet/AppletHiddenSpacer.qml | 4 ++-- .../package/contents/ui/applet/AppletItemWrapper.qml | 7 +++++-- containment/package/contents/ui/main.qml | 4 ++-- plasmoid/package/contents/ui/task/TaskHiddenSpacer.qml | 5 +++-- plasmoid/package/contents/ui/task/TaskWrapper.qml | 7 +++++-- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/containment/package/contents/ui/applet/AppletHiddenSpacer.qml b/containment/package/contents/ui/applet/AppletHiddenSpacer.qml index 76242f28a..f9942e51e 100644 --- a/containment/package/contents/ui/applet/AppletHiddenSpacer.qml +++ b/containment/package/contents/ui/applet/AppletHiddenSpacer.qml @@ -44,11 +44,11 @@ Item{ Behavior on nScale { enabled: !root.globalDirectRender - NumberAnimation { duration: 3*container.animationTime } + NumberAnimation { duration: 3 * container.animationTime } } Behavior on nScale { - enabled: root.globalDirectRender + enabled: root.globalDirectRender && !restoreAnimation.running NumberAnimation { duration: root.directRenderAnimationTime } } diff --git a/containment/package/contents/ui/applet/AppletItemWrapper.qml b/containment/package/contents/ui/applet/AppletItemWrapper.qml index 4d30609c5..2a59875dc 100644 --- a/containment/package/contents/ui/applet/AppletItemWrapper.qml +++ b/containment/package/contents/ui/applet/AppletItemWrapper.qml @@ -609,11 +609,14 @@ Item{ Behavior on zoomScale { enabled: !root.globalDirectRender - NumberAnimation { duration: 3*container.animationTime } + NumberAnimation { + duration: 4 * container.animationTime + easing.type: Easing.OutCubic + } } Behavior on zoomScale { - enabled: root.globalDirectRender + enabled: root.globalDirectRender && !restoreAnimation.running NumberAnimation { duration: root.directRenderAnimationTime } } diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index 6a9ef9c9f..c91e16651 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -1540,7 +1540,7 @@ DragDrop.DropArea { if (enableDirectRenderTimer.running) enableDirectRenderTimer.stop(); - root.globalDirectRender = false; + setGlobalDirectRender(false); root.clearZoom(); } @@ -1560,7 +1560,7 @@ DragDrop.DropArea { if (latteApplet && latteApplet.waitingLaunchers.length > 0) return; - if (dock.visibility.containsMouse && !rootMouseArea.containsMouse){ + if (dock.visibility.containsMouse && !rootMouseArea.containsMouse && mouseInCanBeHoveredApplet()){ setGlobalDirectRender(true); } diff --git a/plasmoid/package/contents/ui/task/TaskHiddenSpacer.qml b/plasmoid/package/contents/ui/task/TaskHiddenSpacer.qml index 48c9a9b00..d7a177c1c 100644 --- a/plasmoid/package/contents/ui/task/TaskHiddenSpacer.qml +++ b/plasmoid/package/contents/ui/task/TaskHiddenSpacer.qml @@ -20,6 +20,7 @@ import QtQuick 2.0 +import org.kde.latte 0.1 as Latte Item{ id: hiddenSpacer @@ -98,11 +99,11 @@ Item{ Behavior on separatorSpace { enabled: mainItemContainer.inFastRestoreAnimation || showWindowAnimation.running - NumberAnimation { duration: 3 * mainItemContainer.animationTime } + NumberAnimation{ duration: 3 * mainItemContainer.animationTime } } Behavior on separatorSpace { - enabled: !mainItemContainer.inFastRestoreAnimation && !showWindowAnimation.running + enabled: !mainItemContainer.inFastRestoreAnimation && !showWindowAnimation.running && !restoreAnimation.running NumberAnimation { duration: root.directRenderAnimationTime } } diff --git a/plasmoid/package/contents/ui/task/TaskWrapper.qml b/plasmoid/package/contents/ui/task/TaskWrapper.qml index b1f62ccd3..a74c7614a 100644 --- a/plasmoid/package/contents/ui/task/TaskWrapper.qml +++ b/plasmoid/package/contents/ui/task/TaskWrapper.qml @@ -118,11 +118,14 @@ Item{ Behavior on mScale { enabled: !root.globalDirectRender || inMimicParabolicAnimation - NumberAnimation { duration: 3 * mainItemContainer.animationTime } + NumberAnimation{ + duration: 4 * mainItemContainer.animationTime + easing.type: Easing.OutCubic + } } Behavior on mScale { - enabled: root.globalDirectRender && !inMimicParabolicAnimation + enabled: root.globalDirectRender && !inMimicParabolicAnimation && !restoreAnimation.running NumberAnimation { duration: root.directRenderAnimationTime } }