diff options
author | p.kuiper <p.kuiper@ultimaker.com> | 2022-05-30 08:59:50 +0300 |
---|---|---|
committer | p.kuiper <p.kuiper@ultimaker.com> | 2022-05-30 08:59:50 +0300 |
commit | 0db75501a312dc9561eabfde26fbecef5f137c5a (patch) | |
tree | 53a934ec39348aabd7b5002739092c9b089a333d /resources/qml/Account/SyncState.qml | |
parent | 9fdeffd564aab5f896bd6405176b7a8491c69303 (diff) | |
parent | 596c24657d39804c8bc94e6e8f99436115d7e411 (diff) |
Merge remote-tracking branch 'origin/main' into PP-3_improved_experimental_bridge_settings
# Conflicts:
# resources/definitions/ultimaker.def.json
Diffstat (limited to 'resources/qml/Account/SyncState.qml')
-rw-r--r-- | resources/qml/Account/SyncState.qml | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/resources/qml/Account/SyncState.qml b/resources/qml/Account/SyncState.qml index e5731ff9d7..b558714376 100644 --- a/resources/qml/Account/SyncState.qml +++ b/resources/qml/Account/SyncState.qml @@ -13,37 +13,44 @@ Row // Sync state icon + message height: childrenRect.height spacing: UM.Theme.getSize("narrow_margin").height + // These are the enums from cura/API/account.py + // somehow exposing these enums from python to QML doesn't work properly anymore + property var _Cura_AccountSyncState_SYNCING: 0 + property var _Cura_AccountSyncState_SUCCESS: 1 + property var _Cura_AccountSyncState_ERROR: 2 + property var _Cura_AccountSyncState_IDLE: 3 + states: [ State { name: "idle" - when: syncState == Cura.AccountSyncState.IDLE + when: syncState == _Cura_AccountSyncState_IDLE PropertyChanges { target: icon; source: UM.Theme.getIcon("ArrowDoubleCircleRight")} }, State { name: "syncing" - when: syncState == Cura.AccountSyncState.SYNCING + when: syncState == _Cura_AccountSyncState_SYNCING PropertyChanges { target: icon; source: UM.Theme.getIcon("ArrowDoubleCircleRight") } PropertyChanges { target: stateLabel; text: catalog.i18nc("@label", "Checking...")} }, State { name: "up_to_date" - when: syncState == Cura.AccountSyncState.SUCCESS + when: syncState == _Cura_AccountSyncState_SUCCESS PropertyChanges { target: icon; source: UM.Theme.getIcon("CheckCircle") } PropertyChanges { target: stateLabel; text: catalog.i18nc("@label", "Account synced")} }, State { name: "error" - when: syncState == Cura.AccountSyncState.ERROR + when: syncState == _Cura_AccountSyncState_ERROR PropertyChanges { target: icon; source: UM.Theme.getIcon("Warning") } PropertyChanges { target: stateLabel; text: catalog.i18nc("@label", "Something went wrong...")} } ] - UM.RecolorImage + UM.ColorImage { id: icon width: 20 * screenScaleFactor |