mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Adjust the color of the printer in the printer selector
For that I needed to get rid of the IconLabel component, since in this case the color of the icon and the text is the same (and it makes sense)
This commit is contained in:
parent
aab61ce8da
commit
26a41c3726
2 changed files with 41 additions and 17 deletions
|
|
@ -25,29 +25,52 @@ Cura.ExpandableComponent
|
|||
name: "cura"
|
||||
}
|
||||
|
||||
headerItem: Cura.IconLabel
|
||||
headerItem: Item
|
||||
{
|
||||
text: isNetworkPrinter ? Cura.MachineManager.activeMachineNetworkGroupName : Cura.MachineManager.activeMachineName
|
||||
source:
|
||||
{
|
||||
if (isNetworkPrinter)
|
||||
{
|
||||
if (machineSelector.outputDevice != null && machineSelector.outputDevice.clusterSize > 1)
|
||||
{
|
||||
return UM.Theme.getIcon("printer_group")
|
||||
}
|
||||
return UM.Theme.getIcon("printer_single")
|
||||
}
|
||||
return ""
|
||||
}
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("text")
|
||||
iconSize: UM.Theme.getSize("machine_selector_icon").width
|
||||
implicitHeight: icon.height
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
id: icon
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
source:
|
||||
{
|
||||
if (isNetworkPrinter)
|
||||
{
|
||||
if (machineSelector.outputDevice != null && machineSelector.outputDevice.clusterSize > 1)
|
||||
{
|
||||
return UM.Theme.getIcon("printer_group")
|
||||
}
|
||||
return UM.Theme.getIcon("printer_single")
|
||||
}
|
||||
return ""
|
||||
}
|
||||
width: UM.Theme.getSize("machine_selector_icon").width
|
||||
height: width
|
||||
|
||||
color: UM.Theme.getColor("machine_selector_printer_icon")
|
||||
visible: source != ""
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: label
|
||||
anchors.left: icon.visible ? icon.right : parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: UM.Theme.getSize("thin_margin").width
|
||||
anchors.verticalCenter: icon.verticalCenter
|
||||
text: isNetworkPrinter ? Cura.MachineManager.activeMachineNetworkGroupName : Cura.MachineManager.activeMachineName
|
||||
elide: Text.ElideRight
|
||||
color: UM.Theme.getColor("text")
|
||||
font: UM.Theme.getFont("medium")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
anchors
|
||||
{
|
||||
bottom: parent.bottom
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@
|
|||
"machine_selector_active": [68, 72, 75, 255],
|
||||
"machine_selector_hover": [68, 72, 75, 255],
|
||||
"machine_selector_text_active": [255, 255, 255, 255],
|
||||
"machine_selector_printer_icon": [8, 7, 63, 255],
|
||||
|
||||
"action_panel_secondary": [27, 95, 202, 255],
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue