mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -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
|
target: background
|
||||||
property: "color"
|
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
|
implicitHeight: 100 * screenScaleFactor
|
||||||
|
|
|
@ -94,7 +94,20 @@ Item
|
||||||
{
|
{
|
||||||
target: background
|
target: background
|
||||||
property: "color"
|
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
|
implicitHeight: 100 * screenScaleFactor
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue