mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Update available configuration button
This commit is contained in:
parent
29d1de03d1
commit
f90f5f5180
1 changed files with 26 additions and 2 deletions
|
@ -103,9 +103,24 @@ Rectangle
|
|||
id: mouse
|
||||
anchors.fill: parent
|
||||
onClicked: activateConfiguration()
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
hoverEnabled: true
|
||||
onEntered: parent.border.color = UM.Theme.getColor("configuration_item_border_hover")
|
||||
onExited: updateBorderColor()
|
||||
onEntered:
|
||||
{
|
||||
parent.border.color = UM.Theme.getColor("configuration_item_border_hover")
|
||||
if (configurationItem.selected == false)
|
||||
{
|
||||
configurationItem.color = UM.Theme.getColor("sidebar_lining")
|
||||
}
|
||||
}
|
||||
onExited:
|
||||
{
|
||||
updateBorderColor()
|
||||
if (configurationItem.selected == false)
|
||||
{
|
||||
configurationItem.color = UM.Theme.getColor("configuration_item")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
|
@ -122,4 +137,13 @@ Rectangle
|
|||
configurationItem.selected = Cura.MachineManager.matchesConfiguration(configuration)
|
||||
updateBorderColor()
|
||||
}
|
||||
|
||||
onVisibleChanged:
|
||||
{
|
||||
if(visible)
|
||||
{
|
||||
// I cannot trigger function updateBorderColor() after visibility change
|
||||
color = selected ? UM.Theme.getColor("configuration_item_active") : UM.Theme.getColor("configuration_item")
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue