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

re-work mmatugen meta theming

able to handle more rapid changes now, and colors look better
This commit is contained in:
bbedward
2025-08-25 23:19:29 -04:00
parent a185679cd1
commit 473429238f
7 changed files with 319 additions and 467 deletions

View File

@@ -125,12 +125,22 @@ Singleton {
}
function setWallpaper(imagePath) {
console.log("SessionData.setWallpaper called with:", imagePath)
wallpaperPath = imagePath
saveSettings()
if (typeof Theme !== "undefined" && typeof SettingsData !== "undefined"
&& SettingsData.wallpaperDynamicTheming) {
Theme.extractColors()
if (typeof Theme !== "undefined") {
console.log("Theme is available, current theme:", Theme.currentTheme)
// Always extract colors for shell UI if dynamic theming is enabled
if (typeof SettingsData !== "undefined" && SettingsData.wallpaperDynamicTheming) {
console.log("Dynamic theming enabled, extracting colors")
Theme.extractColors()
}
// Always generate system themes (matugen templates) when wallpaper changes
console.log("Calling generateSystemThemesFromCurrentTheme")
Theme.generateSystemThemesFromCurrentTheme()
} else {
console.log("Theme is undefined!")
}
}