From d12659f71f5838ac9442a6b302ba21cce2116a89 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Mon, 10 Jul 2023 14:36:14 +0200 Subject: [PATCH] Added refresh moving icon for feedback purpose While refreshing the material sync, no feedback was provided before, now there is a refreshing icon animation available for "refresh in progress" fixes: CURA-8754 --- resources/qml/Preferences/Materials/MaterialsSyncDialog.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml b/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml index 5c40f93837..a82789d01c 100644 --- a/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml +++ b/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml @@ -430,17 +430,19 @@ UM.Window { id: refreshListButton property int accountState: Cura.API.account.syncState + readonly property int _AccountSyncState_SYNCING: 0 + readonly property int _AccountSyncState_SUCCESS: 1 Layout.alignment: Qt.AlignVCenter text: catalog.i18nc("@button", "Refresh List") iconSource: UM.Theme.getIcon("ArrowDoubleCircleRight") onClicked: Cura.API.account.sync(true) onAccountStateChanged: { - if (Cura.API.account.syncState == 0) + if (Cura.API.account.syncState == _AccountSyncState_SYNCING) { refreshListButton.visible = false; } - if (Cura.API.account.syncState == 1) + else if (Cura.API.account.syncState == _AccountSyncState_SUCCESS) { refreshListButton.visible = true; }