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

(cherry picked from commit ec27d4643c)
This commit is contained in:
bbedward
2026-07-15 09:38:19 -04:00
parent c4bca6f6cd
commit e94fc7fe99
5 changed files with 55 additions and 6 deletions
+1 -1
View File
@@ -213,7 +213,7 @@ Item {
}
Component.onCompleted: {
dockRecreateDebounce.start();
dockEnabled = true;
loginSoundTimer.start();
osdStartupTimer.start();
@@ -33,6 +33,8 @@ Variants {
color: "transparent"
visible: root.contentReady && !root.surfaceBounce
updatesEnabled: root.renderActive || root._settleFrames > 0
mask: Region {
@@ -56,6 +58,8 @@ Variants {
property string source: SessionData.getMonitorWallpaper(modelData.name) || ""
property bool isColorSource: source.startsWith("#")
property bool contentReady: false
property bool surfaceBounce: false
Connections {
target: SessionData
@@ -94,6 +98,9 @@ Variants {
Component.onCompleted: {
isInitialized = true;
if (!source || isColorSource) {
contentReady = true;
}
}
property bool isInitialized: false
@@ -136,9 +143,9 @@ Variants {
interval: 0
repeat: false
onTriggered: {
blurWallpaperWindow.visible = false;
root.surfaceBounce = true;
Qt.callLater(() => {
blurWallpaperWindow.visible = true;
root.surfaceBounce = false;
});
}
}
@@ -246,6 +253,8 @@ Variants {
transitionAnimation.stop();
root.transitionProgress = 0.0;
root.effectActive = false;
if (!newSource)
root.contentReady = true;
currentWallpaper.source = newSource;
nextWallpaper.source = "";
}
@@ -318,6 +327,9 @@ Variants {
if (status === Image.Error) {
log.warn("failed to load active wallpaper for", modelData.name + ":", source);
}
if (status === Image.Ready || status === Image.Error) {
root.contentReady = true;
}
}
}
+13
View File
@@ -340,7 +340,19 @@ Variants {
return ConnectedModeState.dockRetractActiveForSide(dock._dockScreenName, dock.connectedBarSide);
}
property bool startupRevealDone: false
Timer {
id: startupRevealTimer
interval: 200
running: true
onTriggered: dock.startupRevealDone = true
}
property bool reveal: {
if (!startupRevealDone)
return false;
if (_modalRetractActive)
return false;
@@ -628,6 +640,7 @@ Variants {
id: dockContainer
anchors.fill: parent
clip: false
opacity: dock.startupRevealDone ? 1 : 0
transform: Translate {
id: dockSlide
@@ -359,6 +359,17 @@ Item {
anchors.fill: parent
active: root.widgetEnabled && root.activeComponent !== null
sourceComponent: root.activeComponent
opacity: 0
NumberAnimation {
id: revealFade
target: contentLoader
property: "opacity"
from: 0
to: 1
duration: Theme.mediumDuration
easing.type: Theme.standardEasing
}
function reloadComponent() {
active = false;
@@ -384,6 +395,8 @@ Item {
if (!item)
return;
revealFade.restart();
if (item.pluginService !== undefined) {
item.pluginService = root.isInstance ? instanceScopedPluginService : root.pluginService;
}
+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;
}
}