controlcenter: collapsible section sub heading animation correction
This commit is contained in:
parent
7d839be3e5
commit
483a6fe8e4
1 changed files with 30 additions and 9 deletions
|
|
@ -68,16 +68,37 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
Item {
|
||||||
visible: root.expanded && root.description !== ""
|
visible: root.description !== ""
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.leftMargin: Appearance.padding.normal
|
Layout.preferredHeight: root.expanded ? descriptionText.implicitHeight + Appearance.spacing.smaller + Appearance.spacing.small : 0
|
||||||
Layout.rightMargin: Appearance.padding.normal
|
clip: true
|
||||||
Layout.topMargin: Appearance.spacing.smaller
|
|
||||||
Layout.bottomMargin: Appearance.spacing.small
|
Behavior on Layout.preferredHeight {
|
||||||
text: root.description
|
Anim {
|
||||||
color: Colours.palette.m3onSurfaceVariant
|
easing.bezierCurve: Appearance.anim.curves.standard
|
||||||
font.pointSize: Appearance.font.size.small
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
id: descriptionText
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.leftMargin: Appearance.padding.normal
|
||||||
|
anchors.rightMargin: Appearance.padding.normal
|
||||||
|
anchors.topMargin: Appearance.spacing.smaller
|
||||||
|
text: root.description
|
||||||
|
color: Colours.palette.m3onSurfaceVariant
|
||||||
|
font.pointSize: Appearance.font.size.small
|
||||||
|
opacity: root.expanded ? 1.0 : 0.0
|
||||||
|
|
||||||
|
Behavior on opacity {
|
||||||
|
Anim {
|
||||||
|
easing.bezierCurve: Appearance.anim.curves.standard
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
default property alias content: contentColumn.data
|
default property alias content: contentColumn.data
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue