From 47725ea4b502a9b545b70bb103fbaea1c54f49c5 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Thu, 18 Sep 2025 07:52:08 +0200 Subject: [PATCH] bar: fix autohide's hover region not working on hyprland 0.51 (#1994) --- .config/quickshell/ii/modules/bar/Bar.qml | 4 ++-- .config/quickshell/ii/modules/common/Config.qml | 1 + .config/quickshell/ii/modules/verticalBar/VerticalBar.qml | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.config/quickshell/ii/modules/bar/Bar.qml b/.config/quickshell/ii/modules/bar/Bar.qml index f23c7eb9d..a9c97f8d2 100644 --- a/.config/quickshell/ii/modules/bar/Bar.qml +++ b/.config/quickshell/ii/modules/bar/Bar.qml @@ -93,8 +93,8 @@ Scope { id: hoverMaskRegion anchors { fill: barContent - topMargin: -1 - bottomMargin: -1 + topMargin: -Config.options.bar.autoHide.hoverRegionWidth + bottomMargin: -Config.options.bar.autoHide.hoverRegionWidth } } diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 2fef550c6..d80b2b89f 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -149,6 +149,7 @@ Singleton { property JsonObject bar: JsonObject { property JsonObject autoHide: JsonObject { property bool enable: false + property int hoverRegionWidth: 2 property bool pushWindows: false property JsonObject showWhenPressingSuper: JsonObject { property bool enable: true diff --git a/.config/quickshell/ii/modules/verticalBar/VerticalBar.qml b/.config/quickshell/ii/modules/verticalBar/VerticalBar.qml index d23eb43be..3851f06d3 100644 --- a/.config/quickshell/ii/modules/verticalBar/VerticalBar.qml +++ b/.config/quickshell/ii/modules/verticalBar/VerticalBar.qml @@ -82,8 +82,8 @@ Scope { id: hoverMaskRegion anchors { fill: barContent - leftMargin: -1 - rightMargin: -1 + leftMargin: -Config.options.bar.autoHide.hoverRegionWidth + rightMargin: -Config.options.bar.autoHide.hoverRegionWidth } }