From d82ac63417a759540eea48488be2da5d9e34e399 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Wed, 25 Dec 2019 22:11:24 +0200 Subject: [PATCH] improve publish task geometries code --update the publish task geometries code in order to identify also when the dock has hide itself or is fully shown properly and update the published task geometries accordingly --- .../package/contents/ui/task/TaskItem.qml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/plasmoid/package/contents/ui/task/TaskItem.qml b/plasmoid/package/contents/ui/task/TaskItem.qml index 67e4fd0a1..ec34e1f07 100644 --- a/plasmoid/package/contents/ui/task/TaskItem.qml +++ b/plasmoid/package/contents/ui/task/TaskItem.qml @@ -1297,6 +1297,22 @@ MouseArea{ globalChoords.x = adjX; globalChoords.y = adjY; + if (latteView && latteView.dockIsHidden) { + if (root.position === PlasmaCore.Types.BottomPositioned) { + globalChoords.y = root.screenGeometry.y+root.screenGeometry.height-1; + globalChoords.height = 1; + } else if (root.position === PlasmaCore.Types.TopPositioned) { + globalChoords.y = root.screenGeometry.y+1; + globalChoords.height = 1; + } else if (root.position === PlasmaCore.Types.LeftPositioned) { + globalChoords.x = root.screenGeometry.x+1; + globalChoords.width = 1; + } else if (root.position === PlasmaCore.Types.RightPositioned) { + globalChoords.x = root.screenGeometry.x+root.screenGeometry.width - 1; + globalChoords.width = 1; + } + } + tasksModel.requestPublishDelegateGeometry(taskItem.modelIndex(), globalChoords, taskItem); } } @@ -1454,6 +1470,21 @@ MouseArea{ } } + Connections { + target: latteView + onDockIsHiddenChanged: { + if (dockIsHidden) { + taskItem.slotPublishGeometries(); + } + } + + onDockIsShownCompletelyChanged: { + if (dockIsShownCompletely) { + taskItem.slotPublishGeometries(); + } + } + } + ///// End of Helper functions ////