From 4835ffa4033934a5a808ebff371b01c8451939fd Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 24 Aug 2017 21:22:13 +0200 Subject: [PATCH] Don't recolor printer status buttons Just leave it to the actual icons to provide colour. It may be a bit harder to modify the colours in a different theme then, but now we can have multi-colour icons (as per the new theme requires). Contributes to issue CURA-4148. --- resources/qml/Topbar.qml | 32 -------------------------------- resources/themes/cura/styles.qml | 3 +-- 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/resources/qml/Topbar.qml b/resources/qml/Topbar.qml index a6da453997..974e7af24b 100644 --- a/resources/qml/Topbar.qml +++ b/resources/qml/Topbar.qml @@ -59,38 +59,6 @@ Rectangle onClicked: base.startMonitoringPrint() text: catalog.i18nc("@title:tab", "Print") iconSource: UM.Theme.getIcon("tab_monitor") - 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) - { - case "printing": - case "pre_print": - case "wait_cleanup": - case "pausing": - case "resuming": - return UM.Theme.getColor("status_busy"); - case "ready": - case "": - return UM.Theme.getColor("status_ready"); - case "paused": - return UM.Theme.getColor("status_paused"); - case "error": - return UM.Theme.getColor("status_stopped"); - case "offline": - return UM.Theme.getColor("status_offline"); - default: - return UM.Theme.getColor("text_emphasis"); - } - } property string overlayIconSource: { if(!printerConnected) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index b98a90a136..57837e185b 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -148,10 +148,9 @@ QtObject { sourceSize: Theme.getSize("button_icon") } - UM.RecolorImage + Image { visible: control.overlayIconSource != "" - color: control.overlayColor opacity: !control.enabled ? 0.2 : 1.0 source: control.overlayIconSource width: Theme.getSize("button_icon").width