1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

namespace tweaks for blur and layer targets

This commit is contained in:
bbedward
2025-11-03 21:28:40 -05:00
parent fc0082a470
commit 4f59dfc49c
10 changed files with 103 additions and 43 deletions

View File

@@ -8,7 +8,8 @@ import qs.Services
PanelWindow {
id: root
WlrLayershell.namespace: "quickshell:modal"
property string blurNamespace: "dms:modal"
WlrLayershell.namespace: blurNamespace
property alias content: contentLoader.sourceComponent
property alias contentLoader: contentLoader
@@ -110,24 +111,24 @@ PanelWindow {
bottom: true
}
MouseArea {
anchors.fill: parent
enabled: root.closeOnBackgroundClick && root.shouldBeVisible
onClicked: mouse => {
const localPos = mapToItem(contentContainer, mouse.x, mouse.y)
if (localPos.x < 0 || localPos.x > contentContainer.width || localPos.y < 0 || localPos.y > contentContainer.height) {
root.backgroundClicked()
}
}
}
Rectangle {
id: background
anchors.fill: parent
color: "black"
opacity: root.showBackground ? (root.shouldBeVisible ? root.backgroundOpacity : 0) : 0
visible: root.showBackground
MouseArea {
anchors.fill: parent
enabled: root.closeOnBackgroundClick
onClicked: mouse => {
const localPos = mapToItem(contentContainer, mouse.x, mouse.y)
if (localPos.x < 0 || localPos.x > contentContainer.width || localPos.y < 0 || localPos.y > contentContainer.height) {
root.backgroundClicked()
}
}
}
opacity: root.showBackground && SettingsData.modalDarkenBackground ? (root.shouldBeVisible ? root.backgroundOpacity : 0) : 0
visible: root.showBackground && SettingsData.modalDarkenBackground
Behavior on opacity {
NumberAnimation {