From 4cec95a3ccb3b77fa53dd33b98aa4b1cc8a3e74f Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Sun, 7 Jul 2024 14:24:48 -0400 Subject: [PATCH] lockscreen: Add loading indicator when status bar is loading This gives user indication that the status bar is loading, rather than just nothing being there. --- shell/contents/lockscreen/HeaderComponent.qml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/shell/contents/lockscreen/HeaderComponent.qml b/shell/contents/lockscreen/HeaderComponent.qml index 422fdb97..00ee89cb 100644 --- a/shell/contents/lockscreen/HeaderComponent.qml +++ b/shell/contents/lockscreen/HeaderComponent.qml @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2022 Devin Lin + * SPDX-FileCopyrightText: 2021-2024 Devin Lin * SPDX-License-Identifier: GPL-2.0-or-later */ @@ -9,6 +9,7 @@ import QtQuick.Layouts 1.1 import org.kde.kirigami as Kirigami import org.kde.plasma.private.mobileshell as MobileShell +import org.kde.plasma.components 3.0 as PC3 import org.kde.notificationmanager as NotificationManager @@ -32,6 +33,22 @@ Item { } } + // Add loading indicator when status bar has not loaded yet + PC3.BusyIndicator { + id: statusBarLoadingIndication + anchors.top: parent.top + anchors.right: parent.right + anchors.topMargin: Kirigami.Units.smallSpacing + anchors.rightMargin: Kirigami.Units.smallSpacing + visible: statusBarLoader.status != Loader.Ready + + implicitHeight: root.statusBarHeight + implicitWidth: root.statusBarHeight + + Kirigami.Theme.inherit: false + Kirigami.Theme.colorSet: Kirigami.Theme.Complementary + } + // Status bar Loader { id: statusBarLoader