Disable other buttons while toolbox is downloading to avoid crashes.

I did it that way to not be risky because we're close to the release.

Contributes to CURA-5778.
This commit is contained in:
Diego Prado Gesto 2018-10-01 17:21:34 +02:00
parent a6e98f344e
commit 77fd05ac70
5 changed files with 10 additions and 8 deletions

View file

@ -23,6 +23,7 @@ Item
{
id: button
text: catalog.i18nc("@action:button", "Back")
enabled: !toolbox.isDownloading
UM.RecolorImage
{
id: backArrow
@ -39,7 +40,7 @@ Item
width: width
height: height
}
color: button.hovered ? UM.Theme.getColor("primary") : UM.Theme.getColor("text")
color: button.enabled ? (button.hovered ? UM.Theme.getColor("primary") : UM.Theme.getColor("text")) : UM.Theme.getColor("text_inactive")
source: UM.Theme.getIcon("arrow_left")
}
width: UM.Theme.getSize("toolbox_back_button").width
@ -59,7 +60,7 @@ Item
{
id: labelStyle
text: control.text
color: control.hovered ? UM.Theme.getColor("primary") : UM.Theme.getColor("text")
color: control.enabled ? (control.hovered ? UM.Theme.getColor("primary") : UM.Theme.getColor("text")) : UM.Theme.getColor("text_inactive")
font: UM.Theme.getFont("default_bold")
horizontalAlignment: Text.AlignRight
width: control.width