mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 20:29:05 +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
|
id: refreshListButton
|
||||||
property int accountState: Cura.API.account.syncState
|
property int accountState: Cura.API.account.syncState
|
||||||
|
readonly property int _AccountSyncState_SYNCING: 0
|
||||||
|
readonly property int _AccountSyncState_SUCCESS: 1
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
text: catalog.i18nc("@button", "Refresh List")
|
text: catalog.i18nc("@button", "Refresh List")
|
||||||
iconSource: UM.Theme.getIcon("ArrowDoubleCircleRight")
|
iconSource: UM.Theme.getIcon("ArrowDoubleCircleRight")
|
||||||
onClicked: Cura.API.account.sync(true)
|
onClicked: Cura.API.account.sync(true)
|
||||||
|
|
||||||
onAccountStateChanged: {
|
onAccountStateChanged: {
|
||||||
if (Cura.API.account.syncState == 0)
|
if (Cura.API.account.syncState == _AccountSyncState_SYNCING)
|
||||||
{
|
{
|
||||||
refreshListButton.visible = false;
|
refreshListButton.visible = false;
|
||||||
}
|
}
|
||||||
if (Cura.API.account.syncState == 1)
|
else if (Cura.API.account.syncState == _AccountSyncState_SUCCESS)
|
||||||
{
|
{
|
||||||
refreshListButton.visible = true;
|
refreshListButton.visible = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user