From e9cc81b03a96db6f3f7bb21fc44f6e724e6b3597 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Wed, 20 Jan 2021 20:51:25 +0200 Subject: [PATCH] drop isHalfShown for myView.isShownPartially --provide also myView.isShownFully --- containment/package/contents/ui/VisibilityManager.qml | 7 ------- containment/package/contents/ui/abilities/MyView.qml | 2 ++ containment/package/contents/ui/applet/ParabolicArea.qml | 8 ++++---- containment/package/contents/ui/main.qml | 1 - plasmoid/package/contents/ui/task/ParabolicArea.qml | 2 +- plasmoid/package/contents/ui/task/TaskItem.qml | 4 ++-- plasmoid/package/contents/ui/task/TaskMouseArea.qml | 2 +- 7 files changed, 10 insertions(+), 16 deletions(-) diff --git a/containment/package/contents/ui/VisibilityManager.qml b/containment/package/contents/ui/VisibilityManager.qml index 0e5de3091..de1e89071 100644 --- a/containment/package/contents/ui/VisibilityManager.qml +++ b/containment/package/contents/ui/VisibilityManager.qml @@ -659,12 +659,6 @@ Item{ SequentialAnimation{ id: slidingAnimationAutoHiddenOut - ScriptAction{ - script: { - root.isHalfShown = true; - } - } - PropertyAnimation { target: !root.behaveAsPlasmaPanel ? layoutsContainer : latteView.positioner property: !root.behaveAsPlasmaPanel ? (root.isVertical ? "x" : "y") : "slideOffset" @@ -741,7 +735,6 @@ Item{ ScriptAction{ script: { - root.isHalfShown = false; root.inStartup = false; } } diff --git a/containment/package/contents/ui/abilities/MyView.qml b/containment/package/contents/ui/abilities/MyView.qml index 423622320..6c53866e5 100644 --- a/containment/package/contents/ui/abilities/MyView.qml +++ b/containment/package/contents/ui/abilities/MyView.qml @@ -30,6 +30,8 @@ AbilityHost.MyView { inNormalState: ((animations.needBothAxis.count === 0) && (animations.needLength.count === 0)) || (latteView && latteView.visibility.isHidden && !latteView.visibility.containsMouse && animations.needThickness.count === 0) isHidden: isReady && latteView.visibility.isHidden + isShownPartially: isReady && (inSlidingIn || inSlidingOut) + isShownFully: isReady && !isHidden && !inSlidingIn && !inSlidingOut inSlidingIn: visibilityManager.inSlidingIn inSlidingOut: visibilityManager.inSlidingOut diff --git a/containment/package/contents/ui/applet/ParabolicArea.qml b/containment/package/contents/ui/applet/ParabolicArea.qml index 972216ade..d4b01ba13 100644 --- a/containment/package/contents/ui/applet/ParabolicArea.qml +++ b/containment/package/contents/ui/applet/ParabolicArea.qml @@ -65,8 +65,8 @@ Item { return; } - if (root.isHalfShown || (root.latteApplet - && (root.latteApplet.noTasksInAnimation>0 || root.latteApplet.contextMenu))) { + if (!appletItem.myView.isShownFully || (root.latteApplet + && (root.latteApplet.noTasksInAnimation>0 || root.latteApplet.contextMenu))) { return; } @@ -80,8 +80,8 @@ Item { } onParabolicMove: { - if (root.isHalfShown || (root.latteApplet - && (root.latteApplet.noTasksInAnimation>0 || root.latteApplet.contextMenu))) { + if (!appletItem.myView.isShownFully || (root.latteApplet + && (root.latteApplet.noTasksInAnimation>0 || root.latteApplet.contextMenu))) { return; } diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index ef655a3a8..de5a64eb4 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -217,7 +217,6 @@ Item { property bool inSlidingIn: visibilityManager ? visibilityManager.inSlidingIn : false property bool inSlidingOut: visibilityManager ? visibilityManager.inSlidingOut : false property bool inStartup: true - property bool isHalfShown: false //is used to disable the zoom hovering effect at sliding in-out the dock property bool isHorizontal: plasmoid.formFactor === PlasmaCore.Types.Horizontal property bool isReady: !(dockIsHidden || inSlidingIn || inSlidingOut) property bool isVertical: !isHorizontal diff --git a/plasmoid/package/contents/ui/task/ParabolicArea.qml b/plasmoid/package/contents/ui/task/ParabolicArea.qml index b71f8162e..cadc8b4fd 100644 --- a/plasmoid/package/contents/ui/task/ParabolicArea.qml +++ b/plasmoid/package/contents/ui/task/ParabolicArea.qml @@ -86,7 +86,7 @@ Item { if (mousePos<0 || (inBlockingAnimation && !(inAttentionAnimation||inFastRestoreAnimation||inMimicParabolicAnimation))) return; - if (root.latteView && root.latteView.isHalfShown) { + if (taskItem.abilities.myView.isReady && !taskItem.abilities.myView.isShownFully) { return; } diff --git a/plasmoid/package/contents/ui/task/TaskItem.qml b/plasmoid/package/contents/ui/task/TaskItem.qml index 182740406..051a05a1d 100644 --- a/plasmoid/package/contents/ui/task/TaskItem.qml +++ b/plasmoid/package/contents/ui/task/TaskItem.qml @@ -761,8 +761,8 @@ Item { } if(windowsPreviewDlg.activeItem !== taskItem){ - if (!root.latteView - || (root.latteView && !root.latteView.isHalfShown && !root.latteView.inSlidingIn && !root.latteView.inSlidingOut)) { + if (!taskItem.abilities.myView.isReady + || (taskItem.abilities.myView.isReady && taskItem.abilities.myView.isShownFully)) { if (root.latteView && root.titleTooltips) { root.latteView.hideTooltipLabel(); } diff --git a/plasmoid/package/contents/ui/task/TaskMouseArea.qml b/plasmoid/package/contents/ui/task/TaskMouseArea.qml index 39c3ecf06..6c89f251b 100644 --- a/plasmoid/package/contents/ui/task/TaskMouseArea.qml +++ b/plasmoid/package/contents/ui/task/TaskMouseArea.qml @@ -88,7 +88,7 @@ MouseArea { if ((inBlockingAnimation && !(inAttentionAnimation||inFastRestoreAnimation||inMimicParabolicAnimation))) return; - if (root.latteView && root.latteView.isHalfShown) { + if (taskItem.abilities.myView.isReady && !taskItem.abilities.myView.isShownFully) { return; }