mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 23:16:06 +08:00
Remove unused aliases from SyncState.qml
CURA-7290
This commit is contained in:
parent
37992e25de
commit
97d1c3200b
@ -7,11 +7,7 @@ import Cura 1.1 as Cura
|
|||||||
Row // sync state icon + message
|
Row // sync state icon + message
|
||||||
{
|
{
|
||||||
|
|
||||||
property alias iconSource: icon.source
|
id: syncRow
|
||||||
property alias labelText: stateLabel.text
|
|
||||||
property alias syncButtonVisible: accountSyncButton.visible
|
|
||||||
property alias animateIconRotation: updateAnimator.running
|
|
||||||
|
|
||||||
width: childrenRect.width
|
width: childrenRect.width
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
@ -83,24 +79,24 @@ Row // sync state icon + message
|
|||||||
|
|
||||||
onSyncStateChanged: {
|
onSyncStateChanged: {
|
||||||
if(newState == Cura.AccountSyncState.SYNCING){
|
if(newState == Cura.AccountSyncState.SYNCING){
|
||||||
syncRow.iconSource = UM.Theme.getIcon("update")
|
icon.source = UM.Theme.getIcon("update")
|
||||||
syncRow.labelText = catalog.i18nc("@label", "Checking...")
|
stateLabel.text = catalog.i18nc("@label", "Checking...")
|
||||||
} else if (newState == Cura.AccountSyncState.SUCCESS) {
|
} else if (newState == Cura.AccountSyncState.SUCCESS) {
|
||||||
syncRow.iconSource = UM.Theme.getIcon("checked")
|
icon.source = UM.Theme.getIcon("checked")
|
||||||
syncRow.labelText = catalog.i18nc("@label", "You are up to date")
|
stateLabel.text = catalog.i18nc("@label", "You are up to date")
|
||||||
} else if (newState == Cura.AccountSyncState.ERROR) {
|
} else if (newState == Cura.AccountSyncState.ERROR) {
|
||||||
syncRow.iconSource = UM.Theme.getIcon("warning_light")
|
icon.source = UM.Theme.getIcon("warning_light")
|
||||||
syncRow.labelText = catalog.i18nc("@label", "Something went wrong...")
|
stateLabel.text = catalog.i18nc("@label", "Something went wrong...")
|
||||||
} else {
|
} else {
|
||||||
print("Error: unexpected sync state: " + newState)
|
print("Error: unexpected sync state: " + newState)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(newState == Cura.AccountSyncState.SYNCING){
|
if(newState == Cura.AccountSyncState.SYNCING){
|
||||||
syncRow.animateIconRotation = true
|
updateAnimator.running = true
|
||||||
syncRow.syncButtonVisible = false
|
accountSyncButton.visible = false
|
||||||
} else {
|
} else {
|
||||||
syncRow.animateIconRotation = false
|
updateAnimator.running = false
|
||||||
syncRow.syncButtonVisible = true
|
accountSyncButton.visible = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,12 +29,7 @@ Column
|
|||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
}
|
}
|
||||||
|
|
||||||
SyncState
|
SyncState {}
|
||||||
{
|
|
||||||
id: syncRow
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user