From 8fb6c9939a5d9f9299acea6287506a7d258afb8a Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 28 Jul 2016 18:14:38 +0200 Subject: [PATCH] Add "offline" styling to sidebar/monitor CURA-1851 --- resources/qml/MonitorButton.qml | 7 ++++++- resources/qml/Sidebar.qml | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/resources/qml/MonitorButton.qml b/resources/qml/MonitorButton.qml index 7a87eb4f60..4a33b347d3 100644 --- a/resources/qml/MonitorButton.qml +++ b/resources/qml/MonitorButton.qml @@ -30,6 +30,8 @@ Rectangle return UM.Theme.getColor("status_paused") else if (Cura.MachineManager.printerOutputDevices[0].jobState == "error") return UM.Theme.getColor("status_stopped") + else if (Cura.MachineManager.printerOutputDevices[0].jobState == "offline") + return UM.Theme.getColor("status_offline") else return UM.Theme.getColor("text") } @@ -41,7 +43,10 @@ Rectangle { 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") { return catalog.i18nc("@label:", "Printing...") diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 1542e24f5d..8ab776af6a 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -116,6 +116,8 @@ Rectangle 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") }