1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-04 12:52:06 -04:00

Continue frame implementation

This commit is contained in:
purian23
2026-03-23 21:24:03 -04:00
parent 952ab9b753
commit e57ab3e1f3
11 changed files with 221 additions and 60 deletions

View File

@@ -7,19 +7,19 @@ import qs.Common
Item {
id: root
required property string barEdge // "top" | "bottom" | "left" | "right" | ""
required property real barThickness
required property var barEdges // array of "top" | "bottom" | "left" | "right"
anchors.fill: parent
readonly property real _thickness: SettingsData.frameThickness
readonly property real _rounding: SettingsData.frameRounding
readonly property real _thickness: SettingsData.frameThickness
readonly property real _barThickness: SettingsData.frameBarThickness
readonly property real _rounding: SettingsData.frameRounding
Rectangle {
id: borderRect
anchors.fill: parent
color: SettingsData.frameColor
color: SettingsData.effectiveFrameColor
opacity: SettingsData.frameOpacity
layer.enabled: true
@@ -42,10 +42,10 @@ Item {
Rectangle {
anchors {
fill: parent
topMargin: root.barEdge === "top" ? root.barThickness : root._thickness
bottomMargin: root.barEdge === "bottom" ? root.barThickness : root._thickness
leftMargin: root.barEdge === "left" ? root.barThickness : root._thickness
rightMargin: root.barEdge === "right" ? root.barThickness : root._thickness
topMargin: root.barEdges.includes("top") ? root._barThickness : root._thickness
bottomMargin: root.barEdges.includes("bottom") ? root._barThickness : root._thickness
leftMargin: root.barEdges.includes("left") ? root._barThickness : root._thickness
rightMargin: root.barEdges.includes("right") ? root._barThickness : root._thickness
}
radius: root._rounding
}

View File

@@ -10,48 +10,51 @@ Scope {
required property ShellScreen screen
readonly property string barEdge: SettingsData.getActiveBarEdgeForScreen(screen)
readonly property var barEdges: {
SettingsData.barConfigs; // force re-eval when bar configs change
return SettingsData.getActiveBarEdgesForScreen(screen);
}
// One thin invisible PanelWindow per edge.
// Skips the edge where the bar already provides its own exclusiveZone.
// Skips any edge where a bar already provides its own exclusiveZone.
Loader {
active: root.barEdge !== "top"
sourceComponent: EdgeExclusion {
screen: root.screen
anchorTop: true
anchorLeft: true
anchorRight: true
}
}
Loader {
active: root.barEdge !== "bottom"
sourceComponent: EdgeExclusion {
screen: root.screen
anchorBottom: true
anchorLeft: true
anchorRight: true
}
}
Loader {
active: root.barEdge !== "left"
active: !root.barEdges.includes("top")
sourceComponent: EdgeExclusion {
screen: root.screen
anchorLeft: true
anchorTop: true
anchorBottom: true
anchorTop: true
anchorLeft: true
anchorRight: true
}
}
Loader {
active: root.barEdge !== "right"
active: !root.barEdges.includes("bottom")
sourceComponent: EdgeExclusion {
screen: root.screen
anchorRight: true
anchorTop: true
anchorBottom: true
anchorBottom: true
anchorLeft: true
anchorRight: true
}
}
Loader {
active: !root.barEdges.includes("left")
sourceComponent: EdgeExclusion {
screen: root.screen
anchorLeft: true
anchorTop: true
anchorBottom: true
}
}
Loader {
active: !root.barEdges.includes("right")
sourceComponent: EdgeExclusion {
screen: root.screen
anchorRight: true
anchorTop: true
anchorBottom: true
}
}

View File

@@ -11,7 +11,7 @@ PanelWindow {
required property ShellScreen screen
WlrLayershell.namespace: "dms:frame"
WlrLayershell.layer: WlrLayer.Bottom
WlrLayershell.layer: WlrLayer.Top
WlrLayershell.exclusionMode: ExclusionMode.Ignore
anchors {
@@ -28,7 +28,9 @@ PanelWindow {
FrameBorder {
anchors.fill: parent
barEdge: SettingsData.getActiveBarEdgeForScreen(win.screen)
barThickness: SettingsData.getActiveBarThicknessForScreen(win.screen)
barEdges: {
SettingsData.barConfigs; // force re-eval when bar configs change
return SettingsData.getActiveBarEdgesForScreen(win.screen);
}
}
}