mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06: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
4 changed files with 23 additions and 11 deletions
|
@ -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()
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue