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:
@@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user