1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-02 19:48:27 -04:00

restore overlay option and tweak inset padding behavior

This commit is contained in:
bbedward
2026-07-22 14:48:58 -04:00
parent cee7957e15
commit cc307aff98
9 changed files with 68 additions and 16 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ Item {
const configs = SettingsData.barConfigs || [];
for (let i = 0; i < configs.length; i++) {
const bc = configs[i];
if (!bc.enabled)
if (!bc.enabled || (bc.useOverlayLayer ?? false))
continue;
const prefs = bc.screenPreferences || ["all"];
if (!prefs.includes("all") && !SettingsData.isScreenInPreferences(host.targetScreen, prefs))
+14 -4
View File
@@ -16,6 +16,12 @@ Scope {
return SettingsData.getActiveBarEdgesForScreen(screen);
}
// Overlay-layer bars stay standalone even in connected mode and reserve their own edge.
readonly property var overlayBarEdges: {
SettingsData.barConfigs;
return SettingsData.getOverlayBarEdgesForScreen(root.screen);
}
// One thin invisible PanelWindow per edge. A standalone bar reserves its own edge, so
// that edge is skipped — unless the frame hosts the bar (connected mode), where no bar
// window exists and the exclusion must reserve the full bar thickness itself.
@@ -23,13 +29,17 @@ Scope {
readonly property bool screenEnabled: CompositorService.frameWindowVisibleForScreen(root.screen)
readonly property bool hostsBar: CompositorService.frameHostsSurfacesForScreen(root.screen)
function hostsBandForEdge(edge) {
return root.hostsBar && !root.overlayBarEdges.includes(edge);
}
function exclusionSizeForEdge(edge) {
return root.barEdges.includes(edge) ? SettingsData.frameBarSize : SettingsData.frameThickness;
}
Loader {
readonly property bool isBarEdge: root.barEdges.includes("top")
active: root.screenEnabled && (!isBarEdge || root.hostsBar)
active: root.screenEnabled && (!isBarEdge || root.hostsBandForEdge("top"))
sourceComponent: EdgeExclusion {
targetScreen: root.screen
exclusionSize: root.exclusionSizeForEdge("top")
@@ -41,7 +51,7 @@ Scope {
Loader {
readonly property bool isBarEdge: root.barEdges.includes("bottom")
active: root.screenEnabled && (!isBarEdge || root.hostsBar)
active: root.screenEnabled && (!isBarEdge || root.hostsBandForEdge("bottom"))
sourceComponent: EdgeExclusion {
targetScreen: root.screen
exclusionSize: root.exclusionSizeForEdge("bottom")
@@ -53,7 +63,7 @@ Scope {
Loader {
readonly property bool isBarEdge: root.barEdges.includes("left")
active: root.screenEnabled && (!isBarEdge || root.hostsBar)
active: root.screenEnabled && (!isBarEdge || root.hostsBandForEdge("left"))
sourceComponent: EdgeExclusion {
targetScreen: root.screen
exclusionSize: root.exclusionSizeForEdge("left")
@@ -65,7 +75,7 @@ Scope {
Loader {
readonly property bool isBarEdge: root.barEdges.includes("right")
active: root.screenEnabled && (!isBarEdge || root.hostsBar)
active: root.screenEnabled && (!isBarEdge || root.hostsBandForEdge("right"))
sourceComponent: EdgeExclusion {
targetScreen: root.screen
exclusionSize: root.exclusionSizeForEdge("right")
+1 -1
View File
@@ -86,7 +86,7 @@ PanelWindow {
readonly property bool _connectedActive: CompositorService.usesConnectedFrameChromeForScreen(win.targetScreen)
readonly property bool _dockHostedHere: {
if (!win._connectedActive || !SettingsData.showDock)
if (!win._connectedActive || !SettingsData.showDock || SettingsData.dockUseOverlayLayer)
return false;
const screens = SettingsData.getFilteredScreens("dock");
for (let i = 0; i < screens.length; i++) {