forked from Shinonome/dots-hyprland
fix colors not applied properly on first run
This commit is contained in:
@@ -32,6 +32,21 @@ Singleton {
|
|||||||
Appearance.m3colors.darkmode = (Appearance.m3colors.m3background.hslLightness < 0.5)
|
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 {
|
Timer {
|
||||||
id: delayedFileRead
|
id: delayedFileRead
|
||||||
interval: Config.options?.hacks?.arbitraryRaceConditionDelay ?? 100
|
interval: Config.options?.hacks?.arbitraryRaceConditionDelay ?? 100
|
||||||
@@ -54,5 +69,6 @@ Singleton {
|
|||||||
const fileContent = themeFileView.text()
|
const fileContent = themeFileView.text()
|
||||||
root.applyColors(fileContent)
|
root.applyColors(fileContent)
|
||||||
}
|
}
|
||||||
|
onLoadFailed: root.resetFilePathNextTime();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user