diff --git a/ui/StatusQ/src/StatusQ/Components/StatusRoundedImage.qml b/ui/StatusQ/src/StatusQ/Components/StatusRoundedImage.qml index 5f4d880c4d..b6055b9928 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusRoundedImage.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusRoundedImage.qml @@ -5,6 +5,9 @@ import StatusQ.Core.Theme 0.1 Rectangle { id: statusRoundImage + + property bool showLoadingIndicator: false + property alias image: image implicitWidth: 40 @@ -28,4 +31,15 @@ Rectangle { fillMode: Image.PreserveAspectFit cache: true } + + Loader { + id: itemSelector + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + active: showLoadingIndicator && image.status === Image.Loading + sourceComponent: StatusLoadingIndicator { + color: Theme.palette.directColor6 + + } + } } diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusIconTabButton.qml b/ui/StatusQ/src/StatusQ/Controls/StatusIconTabButton.qml index bac5462c30..36b62527f0 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusIconTabButton.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusIconTabButton.qml @@ -45,24 +45,17 @@ TabButton { height: 28 StatusRoundedImage { id: statusRoundImage + showLoadingIndicator: true width: parent.width height: parent.height image.source: icon.source } Loader { - sourceComponent: { - switch (statusRoundImage.image.status) { - case Image.Loading: - return statusLoadingIndicator - break; - case Image.Error: - return letterIdenticon - break; - } - } + sourceComponent:letterIdenticon + anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter - active: statusRoundImage.image.status === Image.Loading || statusRoundImage.image.status === Image.Error + active: statusRoundImage.image.status === Image.Error } Component {