From 4c2dba2e454896cbbe34ca13de23311b46f02438 Mon Sep 17 00:00:00 2001 From: SpeakingPNG Date: Wed, 4 Mar 2026 15:04:32 +0100 Subject: [PATCH 1/8] feat(bar): add a toggle for 1px exclusion zone --- Assets/settings-default.json | 1 + Assets/settings-search-index.json | 9 +++++++++ Commons/Settings.qml | 1 + Modules/MainScreen/BarExclusionZone.qml | 5 +++-- Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml | 9 +++++++++ 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/Assets/settings-default.json b/Assets/settings-default.json index 7a5658aac..7e0a9f676 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -15,6 +15,7 @@ "backgroundOpacity": 0.93, "useSeparateOpacity": false, "floating": false, + "exclusionZoneOffset": false, "marginVertical": 4, "marginHorizontal": 4, "frameThickness": 8, diff --git a/Assets/settings-search-index.json b/Assets/settings-search-index.json index 0880c2fc9..f4d91530d 100644 --- a/Assets/settings-search-index.json +++ b/Assets/settings-search-index.json @@ -251,6 +251,15 @@ "subTab": 0, "subTabLabel": "common.appearance" }, + { + "labelKey": "panels.bar.appearance-exclusion-zone-offset-label", + "descriptionKey": "panels.bar.appearance-exclusion-zone-offset-description", + "widget": "NToggle", + "tab": 4, + "tabLabel": "panels.bar.title", + "subTab": 0, + "subTabLabel": "common.appearance" + }, { "labelKey": "panels.bar.appearance-hide-on-overview-label", "descriptionKey": "panels.bar.appearance-hide-on-overview-description", diff --git a/Commons/Settings.qml b/Commons/Settings.qml index bc1554b36..d7e7010a4 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -184,6 +184,7 @@ Singleton { property int widgetSpacing: 6 property int contentPadding: 2 property real fontScale: 1.0 + property bool exclusionZoneOffset: false // Bar background opacity settings property real backgroundOpacity: 0.93 diff --git a/Modules/MainScreen/BarExclusionZone.qml b/Modules/MainScreen/BarExclusionZone.qml index 44bab77bc..263be07a8 100644 --- a/Modules/MainScreen/BarExclusionZone.qml +++ b/Modules/MainScreen/BarExclusionZone.qml @@ -23,8 +23,9 @@ PanelWindow { readonly property bool barFloating: Settings.data.bar.floating || false readonly property real barMarginH: (barFloating && edge === Settings.getBarPositionForScreen(screen?.name)) ? Math.ceil(Settings.data.bar.marginHorizontal) : 0 readonly property real barMarginV: (barFloating && edge === Settings.getBarPositionForScreen(screen?.name)) ? Math.ceil(Settings.data.bar.marginVertical) : 0 - // Reduce exclusion zone by 1 physical pixel so app windows blend flush against the bar edge - readonly property real bleedInset: 1.0 / (CompositorService.getDisplayScale(screen?.name) || 1.0) + // Allow users to adjust the exclusion zone if they need window borders to bleed under the bar + readonly property real bleedOffset: Settings.data.bar.exclusionZoneOffset ? 1.0 : 0.0 + readonly property real bleedInset: bleedOffset / (CompositorService.getDisplayScale(screen?.name) || 1.0) // Invisible - just reserves space color: "transparent" diff --git a/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml b/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml index 0482dea3c..b717477ae 100644 --- a/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml @@ -226,6 +226,15 @@ ColumnLayout { text: Math.floor(Settings.data.bar.capsuleOpacity * 100) + "%" } + NToggle { + Layout.fillWidth: true + label: I18n.tr("panels.bar.appearance-exclusion-zone-offset-label") + description: I18n.tr("panels.bar.appearance-exclusion-zone-offset-description") + checked: Settings.data.bar.exclusionZoneOffset + defaultValue: Settings.getDefaultValue("bar.exclusionZoneOffset") + onToggled: checked => Settings.data.bar.exclusionZoneOffset = checked + } + NToggle { Layout.fillWidth: true visible: CompositorService.isNiri From d3796cc36569d0c7c570d0bbf64e5a2fa2dc56dd Mon Sep 17 00:00:00 2001 From: SpeakingPNG Date: Wed, 4 Mar 2026 16:34:46 +0100 Subject: [PATCH 2/8] add exclusion zone toggle to en.json --- Assets/Translations/en.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 1c781d3f1..2a784909a 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -811,6 +811,8 @@ "appearance-density-label": "Bar density", "appearance-desc": "Customize the bar's appearance and position.", "appearance-display-mode-description": "Choose when the bar is visible.", + "appearance-exclusion-zone-offset-description": "Reduce the exclusion zone by 1px so flush windows bleed perfectly under the bar edge.", + "appearance-exclusion-zone-offset-label": "Bleed exclusion zone", "appearance-floating-description": "Display the bar as a floating 'pill'.", "appearance-floating-label": "Floating bar", "appearance-font-scale-description": "Adjust the font size scale for text displayed in the bar.", @@ -1901,8 +1903,6 @@ }, "tooltips": { "add-widget": "Add widget", - "bluetooth-auto-connect-off": "Auto-connect is off — click to enable", - "bluetooth-auto-connect-on": "Auto-connect is on — click to disable", "bluetooth-devices": "Bluetooth devices", "brightness-at": "Brightness: {brightness}%", "click-to-start-recording": "Screen recorder (start recording)", From 83c962592c78c6e45b346828475eabe1064ece77 Mon Sep 17 00:00:00 2001 From: SpeakingPNG Date: Wed, 4 Mar 2026 16:41:08 +0100 Subject: [PATCH 3/8] add this part from upstream --- Assets/Translations/en.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 2a784909a..aeb5c600d 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -1903,6 +1903,8 @@ }, "tooltips": { "add-widget": "Add widget", + "bluetooth-auto-connect-off": "Auto-connect is off — click to enable", + "bluetooth-auto-connect-on": "Auto-connect is on — click to disable", "bluetooth-devices": "Bluetooth devices", "brightness-at": "Brightness: {brightness}%", "click-to-start-recording": "Screen recorder (start recording)", From 93fcf5afe9883fa6e48bf152d89a6487698b51f5 Mon Sep 17 00:00:00 2001 From: SpeakingPNG Date: Wed, 4 Mar 2026 16:51:12 +0100 Subject: [PATCH 4/8] make true the default value --- Assets/settings-default.json | 2 +- Commons/Settings.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/settings-default.json b/Assets/settings-default.json index 8aa0bc58f..629005229 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -15,7 +15,7 @@ "backgroundOpacity": 0.93, "useSeparateOpacity": false, "floating": false, - "exclusionZoneOffset": false, + "exclusionZoneOffset": true, "marginVertical": 4, "marginHorizontal": 4, "frameThickness": 8, diff --git a/Commons/Settings.qml b/Commons/Settings.qml index 95672dfa8..c15e1ad8d 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -184,7 +184,7 @@ Singleton { property int widgetSpacing: 6 property int contentPadding: 2 property real fontScale: 1.0 - property bool exclusionZoneOffset: false + property bool exclusionZoneOffset: true // Bar background opacity settings property real backgroundOpacity: 0.93 From 56d91dd9a535110c9e5dd1d88d2fb5d96ede2b1e Mon Sep 17 00:00:00 2001 From: SpeakingPNG Date: Wed, 4 Mar 2026 16:53:13 +0100 Subject: [PATCH 5/8] change a comment in BarExclusionZone.qml --- Modules/MainScreen/BarExclusionZone.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/MainScreen/BarExclusionZone.qml b/Modules/MainScreen/BarExclusionZone.qml index 263be07a8..1bfd75e6d 100644 --- a/Modules/MainScreen/BarExclusionZone.qml +++ b/Modules/MainScreen/BarExclusionZone.qml @@ -23,7 +23,7 @@ PanelWindow { readonly property bool barFloating: Settings.data.bar.floating || false readonly property real barMarginH: (barFloating && edge === Settings.getBarPositionForScreen(screen?.name)) ? Math.ceil(Settings.data.bar.marginHorizontal) : 0 readonly property real barMarginV: (barFloating && edge === Settings.getBarPositionForScreen(screen?.name)) ? Math.ceil(Settings.data.bar.marginVertical) : 0 - // Allow users to adjust the exclusion zone if they need window borders to bleed under the bar + // Allow users to enable a 1-physical-pixel inset for the exclusion zone so window borders can bleed under the bar readonly property real bleedOffset: Settings.data.bar.exclusionZoneOffset ? 1.0 : 0.0 readonly property real bleedInset: bleedOffset / (CompositorService.getDisplayScale(screen?.name) || 1.0) From 7fd9b5d7de8f066621eb78be0086c0e7651d9cac Mon Sep 17 00:00:00 2001 From: SpeakingPNG Date: Wed, 4 Mar 2026 17:28:54 +0100 Subject: [PATCH 6/8] rename exclusionZoneOffset to enableExclusionZoneInset --- Assets/Translations/en.json | 4 ++-- Assets/settings-default.json | 2 +- Assets/settings-search-index.json | 4 ++-- Commons/Settings.qml | 2 +- Modules/MainScreen/BarExclusionZone.qml | 2 +- Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml | 10 +++++----- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index aeb5c600d..bb2853ed0 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -811,8 +811,8 @@ "appearance-density-label": "Bar density", "appearance-desc": "Customize the bar's appearance and position.", "appearance-display-mode-description": "Choose when the bar is visible.", - "appearance-exclusion-zone-offset-description": "Reduce the exclusion zone by 1px so flush windows bleed perfectly under the bar edge.", - "appearance-exclusion-zone-offset-label": "Bleed exclusion zone", + "appearance-enable-Exclusion-Zone-Inset-description": "Reduce the exclusion zone by 1px so flush windows bleed perfectly under the bar edge.", + "appearance-enable-Exclusion-Zone-Inset-label": "Bleed exclusion zone", "appearance-floating-description": "Display the bar as a floating 'pill'.", "appearance-floating-label": "Floating bar", "appearance-font-scale-description": "Adjust the font size scale for text displayed in the bar.", diff --git a/Assets/settings-default.json b/Assets/settings-default.json index 629005229..f18899261 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -15,7 +15,7 @@ "backgroundOpacity": 0.93, "useSeparateOpacity": false, "floating": false, - "exclusionZoneOffset": true, + "enableExclusionZoneInset": true, "marginVertical": 4, "marginHorizontal": 4, "frameThickness": 8, diff --git a/Assets/settings-search-index.json b/Assets/settings-search-index.json index cac160508..9aa201707 100644 --- a/Assets/settings-search-index.json +++ b/Assets/settings-search-index.json @@ -252,8 +252,8 @@ "subTabLabel": "common.appearance" }, { - "labelKey": "panels.bar.appearance-exclusion-zone-offset-label", - "descriptionKey": "panels.bar.appearance-exclusion-zone-offset-description", + "labelKey": "panels.bar.appearance-enable-Exclusion-Zone-Inset-label", + "descriptionKey": "panels.bar.appearance-enable-Exclusion-Zone-Inset-description", "widget": "NToggle", "tab": 4, "tabLabel": "panels.bar.title", diff --git a/Commons/Settings.qml b/Commons/Settings.qml index c15e1ad8d..55766f867 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -184,7 +184,7 @@ Singleton { property int widgetSpacing: 6 property int contentPadding: 2 property real fontScale: 1.0 - property bool exclusionZoneOffset: true + property bool enableExclusionZoneInset: true // Bar background opacity settings property real backgroundOpacity: 0.93 diff --git a/Modules/MainScreen/BarExclusionZone.qml b/Modules/MainScreen/BarExclusionZone.qml index 1bfd75e6d..0822496f6 100644 --- a/Modules/MainScreen/BarExclusionZone.qml +++ b/Modules/MainScreen/BarExclusionZone.qml @@ -24,7 +24,7 @@ PanelWindow { readonly property real barMarginH: (barFloating && edge === Settings.getBarPositionForScreen(screen?.name)) ? Math.ceil(Settings.data.bar.marginHorizontal) : 0 readonly property real barMarginV: (barFloating && edge === Settings.getBarPositionForScreen(screen?.name)) ? Math.ceil(Settings.data.bar.marginVertical) : 0 // Allow users to enable a 1-physical-pixel inset for the exclusion zone so window borders can bleed under the bar - readonly property real bleedOffset: Settings.data.bar.exclusionZoneOffset ? 1.0 : 0.0 + readonly property real bleedOffset: Settings.data.bar.enableExclusionZoneInset ? 1.0 : 0.0 readonly property real bleedInset: bleedOffset / (CompositorService.getDisplayScale(screen?.name) || 1.0) // Invisible - just reserves space diff --git a/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml b/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml index b717477ae..01b418601 100644 --- a/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml @@ -228,11 +228,11 @@ ColumnLayout { NToggle { Layout.fillWidth: true - label: I18n.tr("panels.bar.appearance-exclusion-zone-offset-label") - description: I18n.tr("panels.bar.appearance-exclusion-zone-offset-description") - checked: Settings.data.bar.exclusionZoneOffset - defaultValue: Settings.getDefaultValue("bar.exclusionZoneOffset") - onToggled: checked => Settings.data.bar.exclusionZoneOffset = checked + label: I18n.tr("panels.bar.appearance-enable-Exclusion-Zone-Inset-label") + description: I18n.tr("panels.bar.appearance-enable-Exclusion-Zone-Inset-description") + checked: Settings.data.bar.enableExclusionZoneInset + defaultValue: Settings.getDefaultValue("bar.enableExclusionZoneInset") + onToggled: checked => Settings.data.bar.enableExclusionZoneInset = checked } NToggle { From 7f49757478cd621be44c74c08250ad7bf05b1267 Mon Sep 17 00:00:00 2001 From: SpeakingPNG Date: Fri, 6 Mar 2026 16:12:48 +0100 Subject: [PATCH 7/8] Exclusion-Zone-Inset to exclusion-zone-inset and small description rename --- Assets/Translations/en.json | 4 ++-- Assets/settings-search-index.json | 4 ++-- Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index bb2853ed0..674cc1b46 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -811,8 +811,8 @@ "appearance-density-label": "Bar density", "appearance-desc": "Customize the bar's appearance and position.", "appearance-display-mode-description": "Choose when the bar is visible.", - "appearance-enable-Exclusion-Zone-Inset-description": "Reduce the exclusion zone by 1px so flush windows bleed perfectly under the bar edge.", - "appearance-enable-Exclusion-Zone-Inset-label": "Bleed exclusion zone", + "appearance-enable-exclusion-zone-inset-description": "Reduce the exclusion zone by 1 physical pixel so flush windows bleed perfectly under the bar edge.", + "appearance-enable-exclusion-zone-inset-label": "Inset exclusion zone", "appearance-floating-description": "Display the bar as a floating 'pill'.", "appearance-floating-label": "Floating bar", "appearance-font-scale-description": "Adjust the font size scale for text displayed in the bar.", diff --git a/Assets/settings-search-index.json b/Assets/settings-search-index.json index 9aa201707..0f9696a3f 100644 --- a/Assets/settings-search-index.json +++ b/Assets/settings-search-index.json @@ -252,8 +252,8 @@ "subTabLabel": "common.appearance" }, { - "labelKey": "panels.bar.appearance-enable-Exclusion-Zone-Inset-label", - "descriptionKey": "panels.bar.appearance-enable-Exclusion-Zone-Inset-description", + "labelKey": "panels.bar.appearance-enable-exclusion-zone-inset-label", + "descriptionKey": "panels.bar.appearance-enable-exclusion-zone-inset-description", "widget": "NToggle", "tab": 4, "tabLabel": "panels.bar.title", diff --git a/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml b/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml index 01b418601..692efd35c 100644 --- a/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml @@ -228,8 +228,8 @@ ColumnLayout { NToggle { Layout.fillWidth: true - label: I18n.tr("panels.bar.appearance-enable-Exclusion-Zone-Inset-label") - description: I18n.tr("panels.bar.appearance-enable-Exclusion-Zone-Inset-description") + label: I18n.tr("panels.bar.appearance-enable-exclusion-zone-inset-label") + description: I18n.tr("panels.bar.appearance-enable-exclusion-zone-inset-description") checked: Settings.data.bar.enableExclusionZoneInset defaultValue: Settings.getDefaultValue("bar.enableExclusionZoneInset") onToggled: checked => Settings.data.bar.enableExclusionZoneInset = checked From 4076c636f28fb90f2d0177883be98a3380c2d481 Mon Sep 17 00:00:00 2001 From: SpeakingPNG Date: Sun, 8 Mar 2026 16:50:55 +0100 Subject: [PATCH 8/8] change to accomodate the upstream conflict --- Modules/MainScreen/BarExclusionZone.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/MainScreen/BarExclusionZone.qml b/Modules/MainScreen/BarExclusionZone.qml index 0822496f6..e9696e62e 100644 --- a/Modules/MainScreen/BarExclusionZone.qml +++ b/Modules/MainScreen/BarExclusionZone.qml @@ -25,7 +25,11 @@ PanelWindow { readonly property real barMarginV: (barFloating && edge === Settings.getBarPositionForScreen(screen?.name)) ? Math.ceil(Settings.data.bar.marginVertical) : 0 // Allow users to enable a 1-physical-pixel inset for the exclusion zone so window borders can bleed under the bar readonly property real bleedOffset: Settings.data.bar.enableExclusionZoneInset ? 1.0 : 0.0 - readonly property real bleedInset: bleedOffset / (CompositorService.getDisplayScale(screen?.name) || 1.0) + readonly property real bleedInset: { + const info = CompositorService.displayScales[screen?.name]; + const scale = (info && info.scale) ? info.scale : 1.0; + return bleedOffset / scale; + } // Invisible - just reserves space color: "transparent"