Skip to content

Commit 6ca187b

Browse files
committed
fix: borders not merging for unified widgets
refs: 27eecdf
1 parent 5eb1c56 commit 6ca187b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

package/contents/ui/main.qml

+10-6
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ PlasmoidItem {
810810
}
811811
}
812812
horizontal: main.horizontal
813-
unifyBgType: unifyBgType
813+
unifyBgType: rect.unifyBgType
814814
corners: {
815815
"topLeftRadius": rect.topLeftRadius,
816816
"topRightRadius": rect.topRightRadius,
@@ -825,10 +825,14 @@ PlasmoidItem {
825825

826826
CustomBorder {
827827
id: borderSecondary
828-
anchors.topMargin: cfg.border.enabled ? cfg.border.width : 0
829-
anchors.bottomMargin: cfg.border.enabled ? cfg.border.width : 0
830-
anchors.leftMargin: cfg.border.enabled ? cfg.border.width : 0
831-
anchors.rightMargin: cfg.border.enabled ? cfg.border.width : 0
828+
property int extraLMargin: ((rect.unifyBgType === 2 || rect.unifyBgType === 3) && main.horizontal) ? 0 : cfg.border.width
829+
property int extraRMargin: ((rect.unifyBgType === 1 || rect.unifyBgType === 2) && main.horizontal) ? 0 : cfg.border.width
830+
property int extraTMargin: ((rect.unifyBgType === 2 || rect.unifyBgType === 3) && !main.horizontal) ? 0 : cfg.border.width
831+
property int extraBMargin: ((rect.unifyBgType === 1 || rect.unifyBgType === 2) && !main.horizontal) ? 0 : cfg.border.width
832+
anchors.topMargin: cfg.border.enabled ? extraTMargin : 0
833+
anchors.bottomMargin: cfg.border.enabled ? extraBMargin : 0
834+
anchors.leftMargin: cfg.border.enabled ? extraLMargin : 0
835+
anchors.rightMargin: cfg.border.enabled ? extraRMargin : 0
832836
visible: cfg.borderSecondary.enabled && cfgEnabled && Math.min(rect.height, rect.width) > 1
833837
Behavior on borderColor {
834838
enabled: main.animatePropertyChanges
@@ -838,7 +842,7 @@ PlasmoidItem {
838842
}
839843
}
840844
horizontal: main.horizontal
841-
unifyBgType: unifyBgType
845+
unifyBgType: rect.unifyBgType
842846
corners: {
843847
"topLeftRadius": Math.max(rect.topLeftRadius - cfg.border.width, 0),
844848
"topRightRadius": Math.max(rect.topRightRadius - cfg.border.width, 0),

0 commit comments

Comments
 (0)