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()
}
}