bar: auto-hide/exclusive code cleanup

This commit is contained in:
Lemmy
2026-01-31 22:35:02 -05:00
parent 50b7819bca
commit d6be89afb5
6 changed files with 10 additions and 16 deletions
-1
View File
@@ -16,7 +16,6 @@
"frameThickness": 8,
"frameRadius": 12,
"outerCorners": true,
"exclusive": true,
"hideOnOverview": false,
"displayMode": "always_visible",
"autoHideDelay": 500,
+7
View File
@@ -222,6 +222,13 @@
},
"Weather": {
"showBackground": true
},
"SystemStat": {
"showBackground": true,
"statType": "CPU",
"diskPath": "/",
"roundedCorners": true,
"layout": "bottom"
}
}
}
-3
View File
@@ -194,9 +194,6 @@ Singleton {
// Bar outer corners (inverted/concave corners at bar edges when not floating)
property bool outerCorners: true
// Reserves space with compositor
property bool exclusive: true
// Hide bar/panels when compositor overview is active
property bool hideOnOverview: false
+2 -4
View File
@@ -12,8 +12,6 @@ import qs.Commons
PanelWindow {
id: root
property bool exclusive: Settings.data.bar.exclusive !== undefined ? Settings.data.bar.exclusive : false
readonly property string barPosition: Settings.getBarPositionForScreen(screen?.name)
readonly property bool barIsVertical: barPosition === "left" || barPosition === "right"
readonly property bool barFloating: Settings.data.bar.floating || false
@@ -29,7 +27,7 @@ PanelWindow {
// Wayland layer shell configuration
WlrLayershell.layer: WlrLayer.Top
WlrLayershell.namespace: "noctalia-bar-exclusion-" + (screen?.name || "unknown")
WlrLayershell.exclusionMode: exclusive ? ExclusionMode.Auto : ExclusionMode.Ignore
WlrLayershell.exclusionMode: ExclusionMode.Auto
// Anchor based on bar position
anchors {
@@ -67,7 +65,7 @@ PanelWindow {
Component.onCompleted: {
Logger.d("BarExclusionZone", "Created for screen:", screen?.name);
Logger.d("BarExclusionZone", " Position:", barPosition, "Exclusive:", exclusive, "Floating:", barFloating);
Logger.d("BarExclusionZone", " Position:", barPosition, "Floating:", barFloating);
Logger.d("BarExclusionZone", " Anchors - top:", anchors.top, "bottom:", anchors.bottom, "left:", anchors.left, "right:", anchors.right);
Logger.d("BarExclusionZone", " Size:", width, "x", height, "implicitWidth:", implicitWidth, "implicitHeight:", implicitHeight);
}
+1 -2
View File
@@ -17,7 +17,6 @@ PanelWindow {
property string edge: Settings.getBarPositionForScreen(screen?.name)
property real thickness: (edge === Settings.getBarPositionForScreen(screen?.name)) ? Style.getBarHeightForScreen(screen?.name) : (Settings.data.bar.frameThickness ?? 12)
readonly property bool exclusive: Settings.data.bar.exclusive
readonly property bool autoHide: Settings.data.bar.displayMode === "auto_hide"
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
@@ -33,7 +32,7 @@ PanelWindow {
WlrLayershell.layer: WlrLayer.Top
WlrLayershell.namespace: "noctalia-bar-exclusion-" + edge + "-" + (screen?.name || "unknown")
// When auto-hide is enabled, never reserve space
WlrLayershell.exclusionMode: autoHide ? ExclusionMode.Ignore : (exclusive ? ExclusionMode.Auto : ExclusionMode.Ignore)
WlrLayershell.exclusionMode: autoHide ? ExclusionMode.Ignore : ExclusionMode.Auto
// Anchor based on specified edge
anchors {
@@ -112,12 +112,6 @@ ColumnLayout {
onSelected: key => Settings.data.bar.displayMode = key
}
NLabel {
visible: Settings.data.bar.exclusive
label: ""
description: I18n.tr("panels.bar.appearance-auto-hide-exclusive-note")
}
NToggle {
label: I18n.tr("panels.bar.appearance-use-separate-opacity-label")
description: I18n.tr("panels.bar.appearance-use-separate-opacity-description")