From 0a9899491e164066e381a17a5f5c6e2dae157c97 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Wed, 20 Jan 2021 23:25:15 +0200 Subject: [PATCH] remove dockIsHidden property --use instead myView.isHidden --- containment/package/contents/ui/DragDropArea.qml | 4 ++-- .../package/contents/ui/VisibilityManager.qml | 4 +--- containment/package/contents/ui/main.qml | 3 +-- plasmoid/package/contents/ui/main.qml | 9 ++++----- plasmoid/package/contents/ui/task/TaskItem.qml | 14 +++++--------- .../package/contents/ui/task/TaskMouseArea.qml | 2 +- .../ui/task/animations/NewWindowAnimation.qml | 5 +++-- 7 files changed, 17 insertions(+), 24 deletions(-) diff --git a/containment/package/contents/ui/DragDropArea.qml b/containment/package/contents/ui/DragDropArea.qml index 1f2b938dd..87b7d8943 100644 --- a/containment/package/contents/ui/DragDropArea.qml +++ b/containment/package/contents/ui/DragDropArea.qml @@ -112,7 +112,7 @@ DragDrop.DropArea { dragInfo.onlyLaunchers = latteApplet ? latteApplet.launchersDrop(event) : false; dragInfo.computationsAreValid = true; - if (dragInfo.isTask || plasmoid.immutable || dockIsHidden || visibilityManager.inSlidingIn || visibilityManager.inSlidingOut) { + if (dragInfo.isTask || plasmoid.immutable || !root.myView.isShownFully) { event.ignore(); return; } @@ -204,7 +204,7 @@ DragDrop.DropArea { onDrop: { animations.needLength.removeEvent(dragArea); - if (root.ignoreRegularFilesDragging && dragInfo.isTask || dockIsHidden || visibilityManager.inSlidingIn || visibilityManager.inSlidingOut) { + if ((root.ignoreRegularFilesDragging && dragInfo.isTask) || !root.myView.isShownFully) { return; } diff --git a/containment/package/contents/ui/VisibilityManager.qml b/containment/package/contents/ui/VisibilityManager.qml index de1e89071..df8c6699a 100644 --- a/containment/package/contents/ui/VisibilityManager.qml +++ b/containment/package/contents/ui/VisibilityManager.qml @@ -54,9 +54,7 @@ Item{ property bool inRelocationHiding: false readonly property bool isSinkedEventEnabled: !(parabolic.isEnabled && (animations.needBothAxis.count>0 || animations.needLength.count>0)) - && !inSlidingIn - && !inSlidingOut - && !root.dockIsHidden + && myView.isShownFully property int length: root.isVertical ? Screen.height : Screen.width //screenGeometry.height : screenGeometry.width diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index 23b6cb2ba..3871e0a0b 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -217,7 +217,7 @@ Item { property bool inSlidingOut: visibilityManager ? visibilityManager.inSlidingOut : false property bool inStartup: true property bool isHorizontal: plasmoid.formFactor === PlasmaCore.Types.Horizontal - property bool isReady: !(dockIsHidden || inSlidingIn || inSlidingOut) + property bool isReady: myView.isShownFully property bool isVertical: !isHorizontal property bool mouseWheelActions: plasmoid.configuration.mouseWheelActions @@ -405,7 +405,6 @@ Item { //shadows for applets, it should be removed as the appleitems don't need it any more property bool badges3DStyle: universalSettings ? universalSettings.badges3DStyle : true property bool enableShadows: plasmoid.configuration.appletShadowsEnabled - property bool dockIsHidden: latteView && latteView.visibility ? latteView.visibility.isHidden : true property bool titleTooltips: { if (behaveAsPlasmaPanel) { diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index 45fa5c34e..3fb7c3618 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -139,7 +139,6 @@ Item { property bool disableLeftSpacer: false property bool disableRightSpacer: false - property bool dockIsHidden: latteView ? latteView.dockIsHidden : false property bool groupTasksByDefault: plasmoid.configuration.groupTasksByDefault property bool highlightWindows: hoverAction === LatteTasks.Types.HighlightWindows || hoverAction === LatteTasks.Types.PreviewAndHighlightWindows @@ -278,10 +277,10 @@ Item { } - Connections{ - target: latteView - onDockIsHiddenChanged:{ - if (latteView.dockIsHidden) { + Connections { + target: appletAbilities.myView + onIsHiddenChanged: { + if (appletAbilities.myView.isHidden) { windowsPreviewDlg.hide("3.3"); } } diff --git a/plasmoid/package/contents/ui/task/TaskItem.qml b/plasmoid/package/contents/ui/task/TaskItem.qml index 685210244..8e4870fd4 100644 --- a/plasmoid/package/contents/ui/task/TaskItem.qml +++ b/plasmoid/package/contents/ui/task/TaskItem.qml @@ -1011,7 +1011,7 @@ Item { globalChoords.x = adjX; globalChoords.y = adjY; - if (latteView && latteView.dockIsHidden) { + if (taskItem.abilities.myView.isHidden) { if (root.location === PlasmaCore.Types.BottomEdge) { globalChoords.y = root.screenGeometry.y+root.screenGeometry.height-1; globalChoords.height = 1; @@ -1202,23 +1202,19 @@ Item { Connections { target: taskItem.abilities.myView - onIsShownFullyChanged: { - if (taskItem.abilities.myView.isShownFully) { + onIsHiddenChanged: { + if (taskItem.abilities.myView.isHidden) { taskItem.slotPublishGeometries(); } } - } - Connections { - target: latteView - onDockIsHiddenChanged: { - if (dockIsHidden) { + onIsShownFullyChanged: { + if (taskItem.abilities.myView.isShownFully) { taskItem.slotPublishGeometries(); } } } - ///// End of Helper functions //// Component.onCompleted: { diff --git a/plasmoid/package/contents/ui/task/TaskMouseArea.qml b/plasmoid/package/contents/ui/task/TaskMouseArea.qml index 6c89f251b..91e1881db 100644 --- a/plasmoid/package/contents/ui/task/TaskMouseArea.qml +++ b/plasmoid/package/contents/ui/task/TaskMouseArea.qml @@ -233,7 +233,7 @@ MouseArea { || wheelIsBlocked || !wheelActionsEnabled || inBouncingAnimation - || (latteView && (latteView.dockIsHidden || latteView.inSlidingIn || latteView.inSlidingOut))){ + || !taskItem.abilities.myView.isShownFully){ return; } diff --git a/plasmoid/package/contents/ui/task/animations/NewWindowAnimation.qml b/plasmoid/package/contents/ui/task/animations/NewWindowAnimation.qml index 4a8a55ccb..875a4d577 100644 --- a/plasmoid/package/contents/ui/task/animations/NewWindowAnimation.qml +++ b/plasmoid/package/contents/ui/task/animations/NewWindowAnimation.qml @@ -85,8 +85,9 @@ Item{ } function startNewWindowAnimation(){ - if (!root.dockIsHidden && ((taskItem.abilities.animations.windowInAttentionEnabled && isDemandingAttention) - || taskItem.abilities.animations.windowAddedInGroupEnabled)){ + if (!taskItem.abilities.myView.isHidden + && ((taskItem.abilities.animations.windowInAttentionEnabled && isDemandingAttention) + || taskItem.abilities.animations.windowAddedInGroupEnabled)){ newWindowAnimation.init(); newWindowAnimationLoader.item.start(); }