diff options
Diffstat (limited to 'components')
| -rw-r--r-- | components/controls/CollapsibleSection.qml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/components/controls/CollapsibleSection.qml b/components/controls/CollapsibleSection.qml index 35acdec..a1f038b 100644 --- a/components/controls/CollapsibleSection.qml +++ b/components/controls/CollapsibleSection.qml @@ -12,6 +12,7 @@ ColumnLayout { required property string title property string description: "" property bool expanded: false + property bool showBackground: false signal toggleRequested @@ -82,6 +83,21 @@ ColumnLayout { } } + StyledRect { + id: backgroundRect + anchors.fill: parent + radius: Appearance.rounding.normal + color: Colours.layer(Colours.palette.m3surfaceContainer, 2) + opacity: root.showBackground && root.expanded ? 1.0 : 0.0 + visible: root.showBackground + + Behavior on opacity { + Anim { + easing.bezierCurve: Appearance.anim.curves.standard + } + } + } + ColumnLayout { id: contentColumn anchors.left: parent.left |