1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-07 22:15:38 -05:00

settings: optimize mem usage

- keep un-loaded unless called upon
This commit is contained in:
bbedward
2025-11-29 18:32:45 -05:00
parent e6c3ae9397
commit b11b375848
8 changed files with 400 additions and 335 deletions

View File

@@ -160,6 +160,7 @@ Variants {
asynchronous: true
smooth: true
cache: true
sourceSize: Qt.size(modelData.width, modelData.height)
fillMode: root.getFillMode(SessionData.isGreeterMode ? GreetdSettings.wallpaperFillMode : SettingsData.wallpaperFillMode)
}
@@ -171,6 +172,7 @@ Variants {
asynchronous: true
smooth: true
cache: true
sourceSize: Qt.size(modelData.width, modelData.height)
fillMode: root.getFillMode(SessionData.isGreeterMode ? GreetdSettings.wallpaperFillMode : SettingsData.wallpaperFillMode)
onStatusChanged: {
@@ -218,14 +220,16 @@ Variants {
duration: 1000
easing.type: Easing.InOutCubic
onFinished: {
const tempSource = nextWallpaper.source;
if (tempSource && nextWallpaper.status === Image.Ready && !tempSource.toString().startsWith("#")) {
currentWallpaper.source = tempSource;
}
root.transitionProgress = 0.0;
currentWallpaper.opacity = 1;
nextWallpaper.opacity = 0;
Qt.callLater(() => {
if (nextWallpaper.source && nextWallpaper.status === Image.Ready && !nextWallpaper.source.toString().startsWith("#")) {
currentWallpaper.source = nextWallpaper.source;
}
nextWallpaper.source = "";
currentWallpaper.opacity = 1;
nextWallpaper.opacity = 0;
root.transitionProgress = 0.0;
});
}
}