1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-01 19:18:28 -04:00

qs: improve initial load of wallpaper, dock, and desktop plugins

This commit is contained in:
bbedward
2026-07-15 09:38:19 -04:00
parent f18d36f6c2
commit ec27d4643c
5 changed files with 55 additions and 6 deletions
+14 -3
View File
@@ -37,6 +37,8 @@ Variants {
color: "transparent"
visible: root.contentReady && !root.surfaceBounce
updatesEnabled: root.renderActive || root._settleFrames > 0
mask: Region {
@@ -64,6 +66,9 @@ Variants {
property string actualTransitionType: transitionType
property bool isInitialized: false
property bool contentReady: false
property bool surfaceBounce: false
property string scrollMode: SettingsData.wallpaperFillMode
property bool scrollingEnabled: scrollMode === "Scrolling"
property int currentWorkspaceIndex: 0
@@ -263,9 +268,9 @@ Variants {
interval: 0
repeat: false
onTriggered: {
wallpaperWindow.visible = false;
root.surfaceBounce = true;
Qt.callLater(() => {
wallpaperWindow.visible = true;
root.surfaceBounce = false;
});
}
}
@@ -506,6 +511,9 @@ Variants {
Component.onCompleted: {
isInitialized = true;
if (!source || isColorSource) {
contentReady = true;
}
if (scrollingEnabled) {
updateWorkspaceData();
@@ -574,8 +582,10 @@ Variants {
root.effectActive = false;
root.screenScale = CompositorService.getScreenScale(modelData);
// No status change coming to clear the flag
if (!newSource || currentWallpaper.source.toString() === newSource)
if (!newSource || currentWallpaper.source.toString() === newSource) {
root.changePending = false;
root.contentReady = true;
}
currentWallpaper.source = newSource;
nextWallpaper.source = "";
@@ -746,6 +756,7 @@ Variants {
}
if (status === Image.Ready || status === Image.Error) {
root.changePending = false;
root.contentReady = true;
}
}