mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 08:43:16 +08: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
@ -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
|
||||
|
@ -94,7 +94,20 @@ Item
|
||||
{
|
||||
target: background
|
||||
property: "color"
|
||||
value: enabled ? headerBackgroundColor : UM.Theme.getColor("disabled")
|
||||
value: base.enabled ? 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…
x
Reference in New Issue
Block a user