mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-30 08:22:51 -05:00
@@ -21,6 +21,7 @@ Singleton {
|
|||||||
|
|
||||||
property bool isLightMode: false
|
property bool isLightMode: false
|
||||||
property bool doNotDisturb: false
|
property bool doNotDisturb: false
|
||||||
|
property bool isSwitchingMode: false
|
||||||
|
|
||||||
property string wallpaperPath: ""
|
property string wallpaperPath: ""
|
||||||
property bool perMonitorWallpaper: false
|
property bool perMonitorWallpaper: false
|
||||||
@@ -294,9 +295,11 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setLightMode(lightMode) {
|
function setLightMode(lightMode) {
|
||||||
|
isSwitchingMode = true
|
||||||
isLightMode = lightMode
|
isLightMode = lightMode
|
||||||
syncWallpaperForCurrentMode()
|
syncWallpaperForCurrentMode()
|
||||||
saveSettings()
|
saveSettings()
|
||||||
|
Qt.callLater(() => { isSwitchingMode = false })
|
||||||
}
|
}
|
||||||
|
|
||||||
function setDoNotDisturb(enabled) {
|
function setDoNotDisturb(enabled) {
|
||||||
|
|||||||
@@ -99,6 +99,8 @@ Variants {
|
|||||||
if (!isInitialized || !currentWallpaper.source) {
|
if (!isInitialized || !currentWallpaper.source) {
|
||||||
setWallpaperImmediate(source.startsWith("file://") ? source : "file://" + source)
|
setWallpaperImmediate(source.startsWith("file://") ? source : "file://" + source)
|
||||||
isInitialized = true
|
isInitialized = true
|
||||||
|
} else if (CompositorService.isNiri && SessionData.isSwitchingMode) {
|
||||||
|
setWallpaperImmediate(source.startsWith("file://") ? source : "file://" + source)
|
||||||
} else {
|
} else {
|
||||||
changeWallpaper(source.startsWith("file://") ? source : "file://" + source)
|
changeWallpaper(source.startsWith("file://") ? source : "file://" + source)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,6 +123,8 @@ Variants {
|
|||||||
if (!isInitialized || !currentWallpaper.source) {
|
if (!isInitialized || !currentWallpaper.source) {
|
||||||
setWallpaperImmediate(source.startsWith("file://") ? source : "file://" + source)
|
setWallpaperImmediate(source.startsWith("file://") ? source : "file://" + source)
|
||||||
isInitialized = true
|
isInitialized = true
|
||||||
|
} else if (CompositorService.isNiri && SessionData.isSwitchingMode) {
|
||||||
|
setWallpaperImmediate(source.startsWith("file://") ? source : "file://" + source)
|
||||||
} else {
|
} else {
|
||||||
changeWallpaper(source.startsWith("file://") ? source : "file://" + source)
|
changeWallpaper(source.startsWith("file://") ? source : "file://" + source)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user