From 2f11e12c757416d1c61bef883061c53bf439092e Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Wed, 13 Aug 2025 09:47:54 +0700 Subject: [PATCH] bar: not show 1px line when autohiding --- .config/quickshell/ii/modules/bar/Bar.qml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.config/quickshell/ii/modules/bar/Bar.qml b/.config/quickshell/ii/modules/bar/Bar.qml index c19fbd31..218e2456 100644 --- a/.config/quickshell/ii/modules/bar/Bar.qml +++ b/.config/quickshell/ii/modules/bar/Bar.qml @@ -66,7 +66,7 @@ Scope { WlrLayershell.namespace: "quickshell:bar" implicitHeight: Appearance.sizes.barHeight + Appearance.rounding.screenRounding mask: Region { - item: barContent + item: hoverMaskRegion } color: "transparent" @@ -82,6 +82,15 @@ Scope { hoverEnabled: true anchors.fill: parent + Item { + id: hoverMaskRegion + anchors { + fill: barContent + topMargin: -1 + bottomMargin: -1 + } + } + BarContent { id: barContent @@ -91,7 +100,7 @@ Scope { left: parent.left top: parent.top 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 } Behavior on anchors.topMargin { @@ -116,7 +125,7 @@ Scope { PropertyChanges { target: barContent 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 } } }