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
pull/11/head
Michail Vourlakos 5 years ago
parent c8bd9553c8
commit d82ac63417

@ -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 ////

Loading…
Cancel
Save