mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 14:04:03 -06:00
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
This commit is contained in:
parent
cca33bb4a5
commit
d12659f71f
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue