CURA-4870 Adjust colors for the selected configuration

Remove the printer icon since it doesn't look as expected
This commit is contained in:
Diego Prado Gesto 2018-03-07 09:56:38 +01:00
parent 5b2ff705e7
commit 813f4e83e0
4 changed files with 23 additions and 11 deletions

View File

@ -17,10 +17,15 @@ Rectangle
height: childrenRect.height
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")
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
{
id: contentColumn
@ -52,7 +57,8 @@ Rectangle
}
//Buildplate row separator
Rectangle {
Rectangle
{
id: separator
visible: buildplateInformation.visible
@ -98,18 +104,22 @@ Rectangle
anchors.fill: parent
onClicked: activateConfiguration()
hoverEnabled: true
onEntered: parent.border.color = UM.Theme.getColor("primary_hover")
onExited: parent.border.color = "black"
onEntered: parent.border.color = UM.Theme.getColor("configuration_item_border_hover")
onExited: updateBorderColor()
}
Connections {
Connections
{
target: Cura.MachineManager
onCurrentConfigurationChanged: {
configurationItem.selected = Cura.MachineManager.matchesConfiguration(configuration)
updateBorderColor()
}
}
Component.onCompleted: {
Component.onCompleted:
{
configurationItem.selected = Cura.MachineManager.matchesConfiguration(configuration)
updateBorderColor()
}
}

View File

@ -12,7 +12,6 @@ Instantiator {
filter: {"type": "machine", "um_network_key": null}
}
MenuItem {
iconSource: UM.Theme.getIcon("printer_single")
text: model.name;
checkable: true;
checked: Cura.MachineManager.activeMachineId == model.id

View File

@ -12,8 +12,8 @@ Instantiator {
filter: {"type": "machine", "um_network_key": "*"}
}
MenuItem {
// TODO: Use printer_group icon when it's a cluster.
iconSource: UM.Theme.getIcon("printer_single")
// 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")
text: model.name;
checkable: true;
checked: Cura.MachineManager.activeMachineId == model.id

View File

@ -302,9 +302,12 @@
"layerview_nozzle": [181, 166, 66, 50],
"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_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": {