Commit bc9e39a6 authored by Michail Vourlakos's avatar Michail Vourlakos
Browse files

use valid paddings for sinked events

parent f45c6eea
......@@ -231,7 +231,7 @@ Item{
}
if (plasmoid.formFactor === PlasmaCore.Types.Vertical) {
return background.paddings.top + Math.abs(metrics.padding.length);
return background.paddings.top + root.firstAppletMarginLength + 1;
}
return metrics.margin.thickness;
......@@ -248,7 +248,7 @@ Item{
}
if (plasmoid.formFactor === PlasmaCore.Types.Vertical) {
return background.paddings.bottom + Math.abs(metrics.padding.length);
return background.paddings.bottom + root.lastAppletMarginLength + 1;
}
return metrics.margin.thickness;
......@@ -265,7 +265,7 @@ Item{
}
if (plasmoid.formFactor === PlasmaCore.Types.Horizontal) {
return background.paddings.left + Math.abs(metrics.padding.length);
return background.paddings.left + root.firstAppletMarginLength + 1;
}
return metrics.margin.thickness;
......@@ -282,7 +282,7 @@ Item{
}
if (plasmoid.formFactor === PlasmaCore.Types.Horizontal) {
return background.paddings.right + Math.abs(metrics.padding.length);
return background.paddings.right + root.lastAppletMarginLength + 1;
}
return metrics.margin.thickness;
......
......@@ -619,6 +619,34 @@ Item {
value: lengthAppletPadding + metrics.margin.length;
}
Binding {
target: root
property: "firstAppletMarginLength"
when: (root.panelAlignment === LatteCore.Types.Justify && appletItem.firstChildOfStartLayout)
|| (root.panelAlignment !== LatteCore.Types.Justify && appletItem.firstChildOfMainLayout)
value: {
if (appletItem.communicator.indexerIsSupported) {
return 0;
}
return appletItem.lengthAppletFullMargin;
}
}
Binding {
target: root
property: "lastAppletMarginLength"
when: (root.panelAlignment === LatteCore.Types.Justify && appletItem.lastChildOfEndLayout)
|| (root.panelAlignment !== LatteCore.Types.Justify && appletItem.lastChildOfMainLayout)
value: {
if (appletItem.communicator.indexerIsSupported) {
return 0;
}
return appletItem.lengthAppletFullMargin;
}
}
//! Connections
Connections{
target: appletItem.shortcuts
......
......@@ -360,6 +360,9 @@ Item {
property int widthMargins: root.isVertical ? metrics.totals.thicknessEdges : metrics.totals.lengthEdges
property int heightMargins: root.isHorizontal ? metrics.totals.thicknessEdges : metrics.totals.lengthEdges
property int firstAppletMarginLength: 0 /*is set by applets*/
property int lastAppletMarginLength: 0 /*is set by applets*/
property int panelAlignment: plasmoid.configuration.alignment
readonly property string plasmoidName: "org.kde.latte.plasmoid"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment