mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 06:49:00 +08: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
@ -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…
x
Reference in New Issue
Block a user