mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
feat(bar): add a toggle for 1px exclusion zone
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
"backgroundOpacity": 0.93,
|
||||
"useSeparateOpacity": false,
|
||||
"floating": false,
|
||||
"exclusionZoneOffset": false,
|
||||
"marginVertical": 4,
|
||||
"marginHorizontal": 4,
|
||||
"frameThickness": 8,
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user