From 96e6477793f732ddaae7ab868695cabf1b070a34 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 17 Jun 2016 13:06:33 +0200 Subject: [PATCH] Print monitoring tab now has icons indicated if it's paused / connected CURA-1036 --- resources/qml/Sidebar.qml | 17 +- .../cura/icons/tab_monitor_connected.svg | 89 +++++++ .../themes/cura/icons/tab_monitor_paused.svg | 243 ++++++++++++++++++ 3 files changed, 348 insertions(+), 1 deletion(-) create mode 100644 resources/themes/cura/icons/tab_monitor_connected.svg create mode 100644 resources/themes/cura/icons/tab_monitor_paused.svg diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index c63e46ed04..f45f3195fe 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -22,6 +22,21 @@ Rectangle color: UM.Theme.getColor("sidebar"); UM.I18nCatalog { id: catalog; name:"cura"} + + property string machineMonitorIcon: + { + if(!printerConnected) + { + return "tab_monitor" + } + if(Cura.MachineManager.printerOutputDevices[0].jobState == "paused") + { + return "tab_monitor_paused" + } else if (Cura.MachineManager.printerOutputDevices[0].jobState != "error") + { + return "tab_monitor_connected" + } + } function showTooltip(item, position, text) { tooltip.text = text; @@ -84,7 +99,7 @@ Rectangle width: (parent.width - UM.Theme.getSize("default_margin").width) / 2 height: 50 onClicked: monitoringPrint = true - iconSource: UM.Theme.getIcon("tab_monitor"); + iconSource: UM.Theme.getIcon(machineMonitorIcon) style: UM.Theme.styles.tool_button checkable: true exclusiveGroup: settingAndMonitorButtonsGroup diff --git a/resources/themes/cura/icons/tab_monitor_connected.svg b/resources/themes/cura/icons/tab_monitor_connected.svg new file mode 100644 index 0000000000..e3b314146a --- /dev/null +++ b/resources/themes/cura/icons/tab_monitor_connected.svg @@ -0,0 +1,89 @@ + + + + + + image/svg+xml + + Fill 1 Copy 3 + + + + + + Fill 1 Copy 3 + Created with Sketch. + + + + + + + + + diff --git a/resources/themes/cura/icons/tab_monitor_paused.svg b/resources/themes/cura/icons/tab_monitor_paused.svg new file mode 100644 index 0000000000..608c279385 --- /dev/null +++ b/resources/themes/cura/icons/tab_monitor_paused.svg @@ -0,0 +1,243 @@ + + + + + + image/svg+xml + + Fill 1 Copy 3 + + + + + + Fill 1 Copy 3 + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +