Don't recolor printer status buttons

Just leave it to the actual icons to provide colour. It may be a bit harder to modify the colours in a different theme then, but now we can have multi-colour icons (as per the new theme requires).

Contributes to issue CURA-4148.
This commit is contained in:
Ghostkeeper 2017-08-24 21:22:13 +02:00
parent 26033e3454
commit 4835ffa403
No known key found for this signature in database
GPG Key ID: C5F96EE2BC0F7E75
2 changed files with 1 additions and 34 deletions

View File

@ -59,38 +59,6 @@ Rectangle
onClicked: base.startMonitoringPrint()
text: catalog.i18nc("@title:tab", "Print")
iconSource: UM.Theme.getIcon("tab_monitor")
property color overlayColor:
{
if(!printerAcceptsCommands)
{
return UM.Theme.getColor("status_unknown");
}
if(Cura.MachineManager.printerOutputDevices[0].printerState == "maintenance")
{
return UM.Theme.getColor("status_busy");
}
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
{
case "printing":
case "pre_print":
case "wait_cleanup":
case "pausing":
case "resuming":
return UM.Theme.getColor("status_busy");
case "ready":
case "":
return UM.Theme.getColor("status_ready");
case "paused":
return UM.Theme.getColor("status_paused");
case "error":
return UM.Theme.getColor("status_stopped");
case "offline":
return UM.Theme.getColor("status_offline");
default:
return UM.Theme.getColor("text_emphasis");
}
}
property string overlayIconSource:
{
if(!printerConnected)

View File

@ -148,10 +148,9 @@ QtObject {
sourceSize: Theme.getSize("button_icon")
}
UM.RecolorImage
Image
{
visible: control.overlayIconSource != ""
color: control.overlayColor
opacity: !control.enabled ? 0.2 : 1.0
source: control.overlayIconSource
width: Theme.getSize("button_icon").width