From 509e7c98fa863334979dd30e8801f8220772047b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Atoch?= Date: Wed, 30 Jul 2025 07:51:41 -0400 Subject: [PATCH] Lockscreen: fix initial weather fetching + added a little breathing room to the UI at the top --- Widgets/LockScreen.qml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Widgets/LockScreen.qml b/Widgets/LockScreen.qml index 29f20fc..b906649 100644 --- a/Widgets/LockScreen.qml +++ b/Widgets/LockScreen.qml @@ -27,9 +27,12 @@ WlSessionLock { property double currentTemp: 0 locked: false - // On component completed, fetch weather data + // On component completed, request to fetch weather data, with a little delay. + // Without this delay the city name is not loaded yet. Component.onCompleted: { - fetchWeatherData(); + Qt.callLater(function () { + fetchWeatherData(); + }) } // Weather fetching function @@ -351,8 +354,8 @@ WlSessionLock { } Rectangle { - width: infoColumn.width + 16 - height: infoColumn.height + width: infoColumn.width + 32 + height: infoColumn.height + 8 color: (Theme.backgroundPrimary !== undefined && Theme.backgroundPrimary !== null) ? Theme.backgroundPrimary : "#222" anchors.horizontalCenter: parent.horizontalCenter bottomLeftRadius: 20