Add "offline" styling to sidebar/monitor

CURA-1851
This commit is contained in:
fieldOfView 2016-07-28 18:14:38 +02:00
parent ce462ace17
commit 8fb6c9939a
2 changed files with 8 additions and 1 deletions

View file

@ -30,6 +30,8 @@ Rectangle
return UM.Theme.getColor("status_paused") return UM.Theme.getColor("status_paused")
else if (Cura.MachineManager.printerOutputDevices[0].jobState == "error") else if (Cura.MachineManager.printerOutputDevices[0].jobState == "error")
return UM.Theme.getColor("status_stopped") return UM.Theme.getColor("status_stopped")
else if (Cura.MachineManager.printerOutputDevices[0].jobState == "offline")
return UM.Theme.getColor("status_offline")
else else
return UM.Theme.getColor("text") return UM.Theme.getColor("text")
} }
@ -41,7 +43,10 @@ Rectangle
{ {
if(!printerConnected) if(!printerConnected)
{ {
return catalog.i18nc("@label:", "Please check your printer connections") return catalog.i18nc("@label:", "Not connected to a printer")
} else if(Cura.MachineManager.printerOutputDevices[0].jobState == "offline")
{
return catalog.i18nc("@label:", "Lost connection with the printer")
} else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing") } else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing")
{ {
return catalog.i18nc("@label:", "Printing...") return catalog.i18nc("@label:", "Printing...")

View file

@ -116,6 +116,8 @@ Rectangle
return UM.Theme.getIcon("tab_monitor_paused") return UM.Theme.getIcon("tab_monitor_paused")
else if (Cura.MachineManager.printerOutputDevices[0].jobState == "error") else if (Cura.MachineManager.printerOutputDevices[0].jobState == "error")
return UM.Theme.getIcon("tab_monitor_stopped") return UM.Theme.getIcon("tab_monitor_stopped")
else if (Cura.MachineManager.printerOutputDevices[0].jobState == "offline")
return UM.Theme.getIcon("tab_monitor_offline")
else else
return UM.Theme.getIcon("tab_monitor") return UM.Theme.getIcon("tab_monitor")
} }