Rename header tab status overlays to make them reusable
The "settings" tab could use a status overlay to show setting errors and slicing paused states.
|
@ -209,6 +209,15 @@ Rectangle
|
||||||
iconSource: printerConnected ? UM.Theme.getIcon("tab_monitor_with_status") : UM.Theme.getIcon("tab_monitor")
|
iconSource: printerConnected ? UM.Theme.getIcon("tab_monitor_with_status") : UM.Theme.getIcon("tab_monitor")
|
||||||
property color overlayColor:
|
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)
|
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
|
||||||
{
|
{
|
||||||
case "printing":
|
case "printing":
|
||||||
|
@ -233,13 +242,17 @@ Rectangle
|
||||||
property string overlayIconSource:
|
property string overlayIconSource:
|
||||||
{
|
{
|
||||||
if(!printerConnected)
|
if(!printerConnected)
|
||||||
|
{
|
||||||
return "";
|
return "";
|
||||||
|
}
|
||||||
else if(!printerAcceptsCommands)
|
else if(!printerAcceptsCommands)
|
||||||
return UM.Theme.getIcon("tab_monitor_unknown");
|
{
|
||||||
|
return UM.Theme.getIcon("tab_status_unknown");
|
||||||
|
}
|
||||||
|
|
||||||
if(Cura.MachineManager.printerOutputDevices[0].printerState == "maintenance")
|
if(Cura.MachineManager.printerOutputDevices[0].printerState == "maintenance")
|
||||||
{
|
{
|
||||||
return UM.Theme.getIcon("tab_monitor_busy");
|
return UM.Theme.getIcon("tab_status_busy");
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
|
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
|
||||||
|
@ -247,18 +260,20 @@ Rectangle
|
||||||
case "printing":
|
case "printing":
|
||||||
case "pre_print":
|
case "pre_print":
|
||||||
case "wait_cleanup":
|
case "wait_cleanup":
|
||||||
return UM.Theme.getIcon("tab_monitor_busy");
|
case "pausing":
|
||||||
|
case "resuming":
|
||||||
|
return UM.Theme.getIcon("tab_status_busy");
|
||||||
case "ready":
|
case "ready":
|
||||||
case "":
|
case "":
|
||||||
return UM.Theme.getIcon("tab_monitor_connected")
|
return UM.Theme.getIcon("tab_status_connected")
|
||||||
case "paused":
|
case "paused":
|
||||||
return UM.Theme.getIcon("tab_monitor_paused")
|
return UM.Theme.getIcon("tab_status_paused")
|
||||||
case "error":
|
case "error":
|
||||||
return UM.Theme.getIcon("tab_monitor_stopped")
|
return UM.Theme.getIcon("tab_status_stopped")
|
||||||
case "offline":
|
case "offline":
|
||||||
return UM.Theme.getIcon("tab_monitor_offline")
|
return UM.Theme.getIcon("tab_status_offline")
|
||||||
default:
|
default:
|
||||||
return UM.Theme.getIcon("tab_monitor")
|
return ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 502 B After Width: | Height: | Size: 502 B |
Before Width: | Height: | Size: 382 B After Width: | Height: | Size: 382 B |
Before Width: | Height: | Size: 459 B After Width: | Height: | Size: 459 B |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
@ -193,6 +193,7 @@
|
||||||
"status_busy": [12, 169, 227, 255],
|
"status_busy": [12, 169, 227, 255],
|
||||||
"status_paused": [255, 140, 0, 255],
|
"status_paused": [255, 140, 0, 255],
|
||||||
"status_stopped": [236, 82, 80, 255],
|
"status_stopped": [236, 82, 80, 255],
|
||||||
|
"status_unknown": [127, 127, 127, 255],
|
||||||
|
|
||||||
"disabled_axis": [127, 127, 127, 255],
|
"disabled_axis": [127, 127, 127, 255],
|
||||||
"x_axis": [255, 0, 0, 255],
|
"x_axis": [255, 0, 0, 255],
|
||||||
|
|