mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 23:29:07 +08:00
Update available configuration button
This commit is contained in:
parent
29d1de03d1
commit
f90f5f5180
@ -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…
x
Reference in New Issue
Block a user