fix colors not applied properly on first run

This commit is contained in:
end-4
2025-10-10 23:58:45 +02:00
parent bd90e2c19e
commit 393d90d3f7
@@ -32,6 +32,21 @@ Singleton {
Appearance.m3colors.darkmode = (Appearance.m3colors.m3background.hslLightness < 0.5)
}
function resetFilePathNextTime() {
resetFilePathNextWallpaperChange.enabled = true
}
Connections {
id: resetFilePathNextWallpaperChange
enabled: false
target: Config.options.background
onWallpaperPathChanged: {
root.filePath = ""
root.filePath = Directories.generatedMaterialThemePath
resetFilePathNextWallpaperChange.enabled = false
}
}
Timer {
id: delayedFileRead
interval: Config.options?.hacks?.arbitraryRaceConditionDelay ?? 100
@@ -54,5 +69,6 @@ Singleton {
const fileContent = themeFileView.text()
root.applyColors(fileContent)
}
onLoadFailed: root.resetFilePathNextTime();
}
}