Scaling: fix scaling not properly applied on startup.

This commit is contained in:
ItsLemmy
2025-09-29 10:20:19 -04:00
parent 22794ea922
commit 5cea61114b
3 changed files with 9 additions and 23 deletions
+2 -2
View File
@@ -233,7 +233,7 @@ Variants {
})
}
}
function setWallpaperInitial() {
// On startup, defer assigning wallpaper until the service cache is ready, retries every tick
if (!WallpaperService || !WallpaperService.isInitialized) {
@@ -311,4 +311,4 @@ Variants {
}
}
}
}
}
-8
View File
@@ -60,14 +60,6 @@ Variants {
}
}
// Update when Settings are loaded
Connections {
target: Settings
function onSettingsLoaded() {
updateDockApps()
}
}
// Shared properties between peek and dock windows
readonly property bool autoHide: Settings.data.dock.autoHide
readonly property int hideDelay: 500
+7 -13
View File
@@ -15,19 +15,13 @@ Singleton {
Component.onCompleted: {
Logger.log("Scaling", "Service started")
}
Connections {
target: Settings
function onSettingsLoaded() {
// Initialize cache from Settings once they are loaded on startup
var monitors = Settings.data.ui.monitorsScaling || []
for (var i = 0; i < monitors.length; i++) {
if (monitors[i].name && monitors[i].scale !== undefined) {
currentScales[monitors[i].name] = monitors[i].scale
root.scaleChanged(monitors[i].name, monitors[i].scale)
Logger.log("Scaling", "Caching scaling for", monitors[i].name, ":", monitors[i].scale)
}
// Initialize cache from Settings once they are loaded on startup
var monitors = Settings.data.ui.monitorsScaling || []
for (var i = 0; i < monitors.length; i++) {
if (monitors[i].name && monitors[i].scale !== undefined) {
currentScales[monitors[i].name] = monitors[i].scale
root.scaleChanged(monitors[i].name, monitors[i].scale)
Logger.log("Scaling", "Caching scaling for", monitors[i].name, ":", monitors[i].scale)
}
}
}