mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 02:16:01 +08:00
CURA-4870 Adjust colors for the selected configuration
Remove the printer icon since it doesn't look as expected
This commit is contained in:
parent
5b2ff705e7
commit
813f4e83e0
@ -17,10 +17,15 @@ Rectangle
|
|||||||
|
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: UM.Theme.getColor("sidebar_lining_thin")
|
border.color: updateBorderColor()
|
||||||
color: selected ? UM.Theme.getColor("configuration_item_active") : UM.Theme.getColor("configuration_item")
|
color: selected ? UM.Theme.getColor("configuration_item_active") : UM.Theme.getColor("configuration_item")
|
||||||
property var textColor: selected ? UM.Theme.getColor("configuration_item_text_active") : UM.Theme.getColor("configuration_item_text")
|
property var textColor: selected ? UM.Theme.getColor("configuration_item_text_active") : UM.Theme.getColor("configuration_item_text")
|
||||||
|
|
||||||
|
function updateBorderColor()
|
||||||
|
{
|
||||||
|
border.color = selected ? UM.Theme.getColor("configuration_item_border_active") : UM.Theme.getColor("configuration_item_border")
|
||||||
|
}
|
||||||
|
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
id: contentColumn
|
id: contentColumn
|
||||||
@ -52,7 +57,8 @@ Rectangle
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Buildplate row separator
|
//Buildplate row separator
|
||||||
Rectangle {
|
Rectangle
|
||||||
|
{
|
||||||
id: separator
|
id: separator
|
||||||
|
|
||||||
visible: buildplateInformation.visible
|
visible: buildplateInformation.visible
|
||||||
@ -98,18 +104,22 @@ Rectangle
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: activateConfiguration()
|
onClicked: activateConfiguration()
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onEntered: parent.border.color = UM.Theme.getColor("primary_hover")
|
onEntered: parent.border.color = UM.Theme.getColor("configuration_item_border_hover")
|
||||||
onExited: parent.border.color = "black"
|
onExited: updateBorderColor()
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections
|
||||||
|
{
|
||||||
target: Cura.MachineManager
|
target: Cura.MachineManager
|
||||||
onCurrentConfigurationChanged: {
|
onCurrentConfigurationChanged: {
|
||||||
configurationItem.selected = Cura.MachineManager.matchesConfiguration(configuration)
|
configurationItem.selected = Cura.MachineManager.matchesConfiguration(configuration)
|
||||||
|
updateBorderColor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted:
|
||||||
|
{
|
||||||
configurationItem.selected = Cura.MachineManager.matchesConfiguration(configuration)
|
configurationItem.selected = Cura.MachineManager.matchesConfiguration(configuration)
|
||||||
|
updateBorderColor()
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -12,7 +12,6 @@ Instantiator {
|
|||||||
filter: {"type": "machine", "um_network_key": null}
|
filter: {"type": "machine", "um_network_key": null}
|
||||||
}
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
iconSource: UM.Theme.getIcon("printer_single")
|
|
||||||
text: model.name;
|
text: model.name;
|
||||||
checkable: true;
|
checkable: true;
|
||||||
checked: Cura.MachineManager.activeMachineId == model.id
|
checked: Cura.MachineManager.activeMachineId == model.id
|
||||||
|
@ -12,8 +12,8 @@ Instantiator {
|
|||||||
filter: {"type": "machine", "um_network_key": "*"}
|
filter: {"type": "machine", "um_network_key": "*"}
|
||||||
}
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
// TODO: Use printer_group icon when it's a cluster.
|
// TODO: Use printer_group icon when it's a cluster. Not use it for now since it doesn't look as expected
|
||||||
iconSource: UM.Theme.getIcon("printer_single")
|
// iconSource: UM.Theme.getIcon("printer_single")
|
||||||
text: model.name;
|
text: model.name;
|
||||||
checkable: true;
|
checkable: true;
|
||||||
checked: Cura.MachineManager.activeMachineId == model.id
|
checked: Cura.MachineManager.activeMachineId == model.id
|
||||||
|
@ -302,9 +302,12 @@
|
|||||||
"layerview_nozzle": [181, 166, 66, 50],
|
"layerview_nozzle": [181, 166, 66, 50],
|
||||||
|
|
||||||
"configuration_item": [255, 255, 255, 0],
|
"configuration_item": [255, 255, 255, 0],
|
||||||
"configuration_item_active": [31, 36, 39, 255],
|
"configuration_item_active": [12, 169, 227, 32],
|
||||||
"configuration_item_text": [0, 0, 0, 255],
|
"configuration_item_text": [0, 0, 0, 255],
|
||||||
"configuration_item_text_active": [255, 255, 255, 255]
|
"configuration_item_text_active": [0, 0, 0, 255],
|
||||||
|
"configuration_item_border": [127, 127, 127, 255],
|
||||||
|
"configuration_item_border_active": [12, 169, 227, 32],
|
||||||
|
"configuration_item_border_hover": [12, 169, 227, 255]
|
||||||
},
|
},
|
||||||
|
|
||||||
"sizes": {
|
"sizes": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user