Ensure that printer icon has disabled color if the printer is disabled

CL-896
This commit is contained in:
Jaime van Kessel 2018-09-05 13:52:41 +02:00
parent 5be65688a0
commit 23cd46824f

View file

@ -164,7 +164,20 @@ Component
width: sourceSize.width
height: sourceSize.height
color: modelData.activePrintJob != undefined ? UM.Theme.getColor("primary") : UM.Theme.getColor("setting_control_disabled")
color:
{
if(modelData.state == "disabled")
{
return UM.Theme.getColor("setting_control_disabled")
}
if(modelData.activePrintJob != undefined)
{
return UM.Theme.getColor("primary")
}
return UM.Theme.getColor("setting_control_disabled")
}
}
}
Item