1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-13 05:17:48 +03:00

plasmoid:fix alignment for Plasma desktop/panels

This commit is contained in:
Michail Vourlakos 2020-11-29 11:29:00 +02:00
parent e15eed7a49
commit f8a3eeae66
2 changed files with 3 additions and 5 deletions

View File

@ -232,6 +232,7 @@ Item {
//BEGIN Latte Dock Communicator
property QtObject latteBridge: null
readonly property bool inPlasmaPanel: latteBridge === null
readonly property bool enforceLattePalette: latteBridge && latteBridge.applyPalette && latteBridge.palette
readonly property bool latteInEditMode: latteBridge && latteBridge.inEditMode
//END Latte Dock Communicator
@ -359,7 +360,7 @@ Item {
return latteView.panelAlignment;
}
return LatteCore.Types.Center;
return !root.vertical ? LatteCore.Types.Left : LatteCore.Types.Top;
}
}

View File

@ -26,10 +26,7 @@ Rectangle {
id: listViewBase
x: {
if (!root.vertical) {
if (plasmoid.location===PlasmaCore.Types.Floating) {
//! Center position Tasks when are located in the Desktop
return root.width < icList.width ? (root.width/2) : icList.width/2;
} else if (root.alignment === LatteCore.Types.Center) {
if (root.alignment === LatteCore.Types.Center) {
return icList.width / 2;
} else if (root.alignment === LatteCore.Types.Left){
return 0;