diff --git a/resources/qml/MonitorButton.qml b/resources/qml/MonitorButton.qml index 6ea9ba482f..4be04b1eab 100644 --- a/resources/qml/MonitorButton.qml +++ b/resources/qml/MonitorButton.qml @@ -15,13 +15,14 @@ Rectangle UM.I18nCatalog { id: catalog; name:"cura"} property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0 + property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands property real progress: printerConnected ? Cura.MachineManager.printerOutputDevices[0].progress : 0 property int backendState: UM.Backend.state property variant statusColor: { - if(!printerConnected) - return UM.Theme.getColor("status_offline"); + if(!printerConnected || !printerAcceptsCommands) + return UM.Theme.getColor("text"); switch(Cura.MachineManager.printerOutputDevices[0].jobState) { @@ -49,7 +50,9 @@ Rectangle property string statusText: { if(!printerConnected) - return catalog.i18nc("@label:MonitorStatus", "Not connected to a printer") + return catalog.i18nc("@label:MonitorStatus", "Not connected to a printer"); + if(!printerAcceptsCommands) + return catalog.i18nc("@label:MonitorStatus", "Printer does not accept commands"); var printerOutputDevice = Cura.MachineManager.printerOutputDevices[0] switch(printerOutputDevice.jobState) @@ -253,7 +256,7 @@ Rectangle return UM.Theme.getColor("action_button_text"); } font: UM.Theme.getFont("action_button") - text: control.text; + text: control.text } } label: Item { } diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 8e2c571a3e..aa51fcfefe 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -108,19 +108,28 @@ Rectangle onClicked: monitoringPrint = true iconSource: { if(!printerConnected) - return UM.Theme.getIcon("tab_monitor") - else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing" || Cura.MachineManager.printerOutputDevices[0].jobState == "pre_print" || Cura.MachineManager.printerOutputDevices[0].jobState == "wait_cleanup" ) - return UM.Theme.getIcon("tab_monitor_busy") - else if(Cura.MachineManager.printerOutputDevices[0].jobState == "ready" || Cura.MachineManager.printerOutputDevices[0].jobState == "") - return UM.Theme.getIcon("tab_monitor_connected") - else if(Cura.MachineManager.printerOutputDevices[0].jobState == "paused") - return UM.Theme.getIcon("tab_monitor_paused") - else if (Cura.MachineManager.printerOutputDevices[0].jobState == "error") - return UM.Theme.getIcon("tab_monitor_stopped") - else if (Cura.MachineManager.printerOutputDevices[0].jobState == "offline") - return UM.Theme.getIcon("tab_monitor_offline") - else - return UM.Theme.getIcon("tab_monitor") + return UM.Theme.getIcon("tab_monitor"); + else if(!printerAcceptsCommands) + return UM.Theme.getIcon("tab_monitor_unknown"); + + switch(Cura.MachineManager.printerOutputDevices[0].jobState) + { + case "printing": + case "pre_print": + case "wait_cleanup": + return UM.Theme.getIcon("tab_monitor_busy"); + case "ready": + case "": + return UM.Theme.getIcon("tab_monitor_connected") + case "paused": + return UM.Theme.getIcon("tab_monitor_paused") + case "error": + return UM.Theme.getIcon("tab_monitor_stopped") + case "offline": + return UM.Theme.getIcon("tab_monitor_offline") + default: + return UM.Theme.getIcon("tab_monitor") + } } checkable: true checked: monitoringPrint diff --git a/resources/themes/cura/icons/tab_monitor_unknown.svg b/resources/themes/cura/icons/tab_monitor_unknown.svg new file mode 100644 index 0000000000..cf95b28ab3 --- /dev/null +++ b/resources/themes/cura/icons/tab_monitor_unknown.svg @@ -0,0 +1,97 @@ + + + + + + image/svg+xml + + Fill 1 Copy 3 + + + + + + Fill 1 Copy 3 + Created with Sketch. + + + + + + + + + + +