mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-30 14:50:12 +03:00
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
This commit is contained in:
parent
0b5628ee1c
commit
b1fb8fe2df
@ -1304,6 +1304,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);
|
||||
}
|
||||
}
|
||||
@ -1461,6 +1477,21 @@ MouseArea{
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: latteView
|
||||
onDockIsHiddenChanged: {
|
||||
if (dockIsHidden) {
|
||||
taskItem.slotPublishGeometries();
|
||||
}
|
||||
}
|
||||
|
||||
onDockIsShownCompletelyChanged: {
|
||||
if (dockIsShownCompletely) {
|
||||
taskItem.slotPublishGeometries();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///// End of Helper functions ////
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user