bar: not show 1px line when autohiding

This commit is contained in:
end-4
2025-08-13 09:47:54 +07:00
parent 2faf615b68
commit 2f11e12c75
+12 -3
View File
@@ -66,7 +66,7 @@ Scope {
WlrLayershell.namespace: "quickshell:bar" WlrLayershell.namespace: "quickshell:bar"
implicitHeight: Appearance.sizes.barHeight + Appearance.rounding.screenRounding implicitHeight: Appearance.sizes.barHeight + Appearance.rounding.screenRounding
mask: Region { mask: Region {
item: barContent item: hoverMaskRegion
} }
color: "transparent" color: "transparent"
@@ -82,6 +82,15 @@ Scope {
hoverEnabled: true hoverEnabled: true
anchors.fill: parent anchors.fill: parent
Item {
id: hoverMaskRegion
anchors {
fill: barContent
topMargin: -1
bottomMargin: -1
}
}
BarContent { BarContent {
id: barContent id: barContent
@@ -91,7 +100,7 @@ Scope {
left: parent.left left: parent.left
top: parent.top top: parent.top
bottom: undefined bottom: undefined
topMargin: (Config?.options.bar.autoHide.enable && !mustShow) ? -Appearance.sizes.barHeight + 1 : 0 topMargin: (Config?.options.bar.autoHide.enable && !mustShow) ? -Appearance.sizes.barHeight : 0
bottomMargin: 0 bottomMargin: 0
} }
Behavior on anchors.topMargin { Behavior on anchors.topMargin {
@@ -116,7 +125,7 @@ Scope {
PropertyChanges { PropertyChanges {
target: barContent target: barContent
anchors.topMargin: 0 anchors.topMargin: 0
anchors.bottomMargin: (Config?.options.bar.autoHide.enable && !mustShow) ? -Appearance.sizes.barHeight + 1 : 0 anchors.bottomMargin: (Config?.options.bar.autoHide.enable && !mustShow) ? -Appearance.sizes.barHeight : 0
} }
} }
} }