Remove unused aliases from SyncState.qml

CURA-7290
This commit is contained in:
Nino van Hooff 2020-05-13 16:14:21 +02:00
parent 37992e25de
commit 97d1c3200b
2 changed files with 12 additions and 21 deletions

View file

@ -7,11 +7,7 @@ import Cura 1.1 as Cura
Row // sync state icon + message
{
property alias iconSource: icon.source
property alias labelText: stateLabel.text
property alias syncButtonVisible: accountSyncButton.visible
property alias animateIconRotation: updateAnimator.running
id: syncRow
width: childrenRect.width
height: childrenRect.height
anchors.horizontalCenter: parent.horizontalCenter
@ -83,24 +79,24 @@ Row // sync state icon + message
onSyncStateChanged: {
if(newState == Cura.AccountSyncState.SYNCING){
syncRow.iconSource = UM.Theme.getIcon("update")
syncRow.labelText = catalog.i18nc("@label", "Checking...")
icon.source = UM.Theme.getIcon("update")
stateLabel.text = catalog.i18nc("@label", "Checking...")
} else if (newState == Cura.AccountSyncState.SUCCESS) {
syncRow.iconSource = UM.Theme.getIcon("checked")
syncRow.labelText = catalog.i18nc("@label", "You are up to date")
icon.source = UM.Theme.getIcon("checked")
stateLabel.text = catalog.i18nc("@label", "You are up to date")
} else if (newState == Cura.AccountSyncState.ERROR) {
syncRow.iconSource = UM.Theme.getIcon("warning_light")
syncRow.labelText = catalog.i18nc("@label", "Something went wrong...")
icon.source = UM.Theme.getIcon("warning_light")
stateLabel.text = catalog.i18nc("@label", "Something went wrong...")
} else {
print("Error: unexpected sync state: " + newState)
}
if(newState == Cura.AccountSyncState.SYNCING){
syncRow.animateIconRotation = true
syncRow.syncButtonVisible = false
updateAnimator.running = true
accountSyncButton.visible = false
} else {
syncRow.animateIconRotation = false
syncRow.syncButtonVisible = true
updateAnimator.running = false
accountSyncButton.visible = true
}
}

View file

@ -29,12 +29,7 @@ Column
color: UM.Theme.getColor("text")
}
SyncState
{
id: syncRow
}
SyncState {}
Label
{