diff --git a/resources/qml/MachineSelection.qml b/resources/qml/MachineSelection.qml index cce2bbea7b..a48045fdbc 100644 --- a/resources/qml/MachineSelection.qml +++ b/resources/qml/MachineSelection.qml @@ -12,7 +12,7 @@ import "Menus" ToolButton { property var isNetworkPrinter: Cura.MachineManager.activeMachineNetworkKey ? true : false - property var printerStatus: Cura.MachineManager.printerOutputDevices.length != 0 ? "connected" : "unknown" + property var printerStatus: Cura.MachineManager.printerOutputDevices.length != 0 ? "connected" : "disconnected" text: Cura.MachineManager.activeMachineName tooltip: Cura.MachineManager.activeMachineName diff --git a/resources/qml/Menus/ConfigurationMenu/SyncButton.qml b/resources/qml/Menus/ConfigurationMenu/SyncButton.qml index 4a92db6e6b..d22dcb1247 100644 --- a/resources/qml/Menus/ConfigurationMenu/SyncButton.qml +++ b/resources/qml/Menus/ConfigurationMenu/SyncButton.qml @@ -12,25 +12,22 @@ Button { id: base property var outputDevice: Cura.MachineManager.printerOutputDevices[0] - text: catalog.i18nc("@label:sync indicator", "No match") + property var matched: updateOnSync() + text: matched == true ? "Yes" : "No" width: parent.width height: parent.height - function updateOnSync() - { - if (outputDevice != undefined) - { - for (var index in outputDevice.uniqueConfigurations) - { + function updateOnSync() { + if (outputDevice != undefined) { + for (var index in outputDevice.uniqueConfigurations) { var configuration = outputDevice.uniqueConfigurations[index] - if (Cura.MachineManager.matchesConfiguration(configuration)) - { - base.text = catalog.i18nc("@label:sync indicator", "Matched") - return + if (Cura.MachineManager.matchesConfiguration(configuration)) { + base.matched = true; + return; } } } - base.text = catalog.i18nc("@label:sync indicator", "No match") + base.matched = false; } style: ButtonStyle @@ -67,18 +64,19 @@ Button color: UM.Theme.getColor("text_emphasis") source: UM.Theme.getIcon("arrow_bottom") } - Label - { + UM.RecolorImage { id: sidebarComboBoxLabel - color: UM.Theme.getColor("sidebar_header_text_active") - text: control.text - elide: Text.ElideRight anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width - anchors.right: downArrow.left - anchors.rightMargin: control.rightMargin anchors.verticalCenter: parent.verticalCenter; - font: UM.Theme.getFont("medium") + + width: UM.Theme.getSize("printer_status_icon").width + height: UM.Theme.getSize("printer_status_icon").height + + color: control.matched ? UM.Theme.getColor("printer_config_matched") : UM.Theme.getColor("printer_config_mismatch") + source: control.matched ? UM.Theme.getIcon("tab_status_connected") : UM.Theme.getIcon("tab_status_unknown") + sourceSize.width: width + sourceSize.height: height } } label: Label {} diff --git a/resources/qml/Menus/PrinterStatusIcon.qml b/resources/qml/Menus/PrinterStatusIcon.qml index 23459386d9..c76ed8bdcb 100644 --- a/resources/qml/Menus/PrinterStatusIcon.qml +++ b/resources/qml/Menus/PrinterStatusIcon.qml @@ -7,7 +7,7 @@ import UM 1.2 as UM import Cura 1.0 as Cura Item { - property var status: "unknown" + property var status: "disconnected" width: childrenRect.width height: childrenRect.height UM.RecolorImage { @@ -17,7 +17,7 @@ Item { sourceSize.width: width sourceSize.height: width color: UM.Theme.getColor("tab_status_" + parent.status ) - source: UM.Theme.getIcon("tab_status_" + parent.status ) + source: UM.Theme.getIcon( parent.status ) } } diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index a93048cb26..d13de1f7e6 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -107,7 +107,7 @@ Rectangle ConfigurationSelection { id: configSelection visible: printerConnected && !sidebar.monitoringPrint && !sidebar.hideSettings - width: visible ? Math.round(base.width * 0.25) : 0 + width: visible ? Math.round(base.width * 0.15) : 0 height: UM.Theme.getSize("sidebar_header").height anchors.top: base.top anchors.right: parent.right diff --git a/resources/themes/cura-light/icons/connected.svg b/resources/themes/cura-light/icons/connected.svg new file mode 100644 index 0000000000..4f0f10bff4 --- /dev/null +++ b/resources/themes/cura-light/icons/connected.svg @@ -0,0 +1,14 @@ + + + Created with Sketch. + + + + + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura-light/icons/disconnected.svg b/resources/themes/cura-light/icons/disconnected.svg new file mode 100644 index 0000000000..2a045c5f1d --- /dev/null +++ b/resources/themes/cura-light/icons/disconnected.svg @@ -0,0 +1,13 @@ + + + Created with Sketch. + + + + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 4cdff3c296..ce6b406d3d 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -314,7 +314,10 @@ "tab_status_finished": [255, 255, 255, 255], "tab_status_paused": [255, 255, 255, 255], "tab_status_stopped": [255, 255, 255, 255], - "tab_status_unknown": [200, 200, 200, 255] + "tab_status_disconnected": [200, 200, 200, 255], + + "printer_config_matched": [12, 169, 227, 255], + "printer_config_mismatch": [255, 145, 62, 255] }, "sizes": {