mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Add "offline" styling to sidebar/monitor
CURA-1851
This commit is contained in:
parent
ce462ace17
commit
8fb6c9939a
2 changed files with 8 additions and 1 deletions
|
@ -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...")
|
||||||
|
|
|
@ -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")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue