mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Close the expandable panel when it becomes disabled
It happens when it's open and the user loads a GCode. Contributes to CURA-5941
This commit is contained in:
parent
4dab33d41b
commit
4b6f4af44e
2 changed files with 31 additions and 2 deletions
|
@ -88,7 +88,23 @@ Item
|
|||
{
|
||||
target: background
|
||||
property: "color"
|
||||
value: enabled ? (expanded ? headerActiveColor : headerBackgroundColor) : UM.Theme.getColor("disabled")
|
||||
value:
|
||||
{
|
||||
return base.enabled ? (expanded ? headerActiveColor : headerBackgroundColor) : UM.Theme.getColor("disabled")
|
||||
}
|
||||
}
|
||||
|
||||
// The panel needs to close when it becomes disabled
|
||||
Connections
|
||||
{
|
||||
target: base
|
||||
onEnabledChanged:
|
||||
{
|
||||
if (!base.enabled && expanded)
|
||||
{
|
||||
toggleContent()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
implicitHeight: 100 * screenScaleFactor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue