mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 18:55:59 +08:00
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.
This commit is contained in:
parent
26033e3454
commit
4835ffa403
@ -59,38 +59,6 @@ Rectangle
|
|||||||
onClicked: base.startMonitoringPrint()
|
onClicked: base.startMonitoringPrint()
|
||||||
text: catalog.i18nc("@title:tab", "Print")
|
text: catalog.i18nc("@title:tab", "Print")
|
||||||
iconSource: UM.Theme.getIcon("tab_monitor")
|
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:
|
property string overlayIconSource:
|
||||||
{
|
{
|
||||||
if(!printerConnected)
|
if(!printerConnected)
|
||||||
|
@ -148,10 +148,9 @@ QtObject {
|
|||||||
|
|
||||||
sourceSize: Theme.getSize("button_icon")
|
sourceSize: Theme.getSize("button_icon")
|
||||||
}
|
}
|
||||||
UM.RecolorImage
|
Image
|
||||||
{
|
{
|
||||||
visible: control.overlayIconSource != ""
|
visible: control.overlayIconSource != ""
|
||||||
color: control.overlayColor
|
|
||||||
opacity: !control.enabled ? 0.2 : 1.0
|
opacity: !control.enabled ? 0.2 : 1.0
|
||||||
source: control.overlayIconSource
|
source: control.overlayIconSource
|
||||||
width: Theme.getSize("button_icon").width
|
width: Theme.getSize("button_icon").width
|
||||||
|
Loading…
x
Reference in New Issue
Block a user