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

per-monitor wallpapers

This commit is contained in:
bbedward
2025-09-05 16:08:32 -04:00
parent 68157ca636
commit 8d674a4fdc
10 changed files with 494 additions and 71 deletions

View File

@@ -14,6 +14,7 @@ Item {
property string passwordBuffer: ""
property bool demoMode: false
property string screenName: ""
signal unlockRequested
@@ -57,17 +58,25 @@ Item {
Loader {
anchors.fill: parent
active: !SessionData.wallpaperPath || (SessionData.wallpaperPath && SessionData.wallpaperPath.startsWith("#"))
active: {
var currentWallpaper = SessionData.getMonitorWallpaper(screenName)
return !currentWallpaper || (currentWallpaper && currentWallpaper.startsWith("#"))
}
asynchronous: true
sourceComponent: DankBackdrop {}
sourceComponent: DankBackdrop {
screenName: root.screenName
}
}
Image {
id: wallpaperBackground
anchors.fill: parent
source: (SessionData.wallpaperPath && !SessionData.wallpaperPath.startsWith("#")) ? SessionData.wallpaperPath : ""
source: {
var currentWallpaper = SessionData.getMonitorWallpaper(screenName)
return (currentWallpaper && !currentWallpaper.startsWith("#")) ? currentWallpaper : ""
}
fillMode: Image.PreserveAspectCrop
smooth: true
asynchronous: false

View File

@@ -38,6 +38,7 @@ PanelWindow {
active: demoActive
sourceComponent: LockScreenContent {
demoMode: true
screenName: root.screen?.name ?? ""
onUnlockRequested: root.hideDemo()
}
}

View File

@@ -25,6 +25,7 @@ WlSessionLockSurface {
sourceComponent: LockScreenContent {
demoMode: false
passwordBuffer: root.sharedPasswordBuffer
screenName: root.screen?.name ?? ""
onUnlockRequested: root.unlock()
onPasswordBufferChanged: {
if (root.sharedPasswordBuffer !== passwordBuffer) {