summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorATMDA <atdma2600@gmail.com>2025-11-16 19:07:51 -0500
committerATMDA <atdma2600@gmail.com>2025-11-16 19:07:51 -0500
commitd2373e03a5cbd0cb97e9c5e32966a0c0afd80f10 (patch)
tree1465c0f0bf6f70d1809fa9bb4eb8f6a800d98b87 /components
parentcontrolcenter: animation correction on certain collapsiblesections (diff)
downloadcaelestia-shell-d2373e03a5cbd0cb97e9c5e32966a0c0afd80f10.tar.gz
caelestia-shell-d2373e03a5cbd0cb97e9c5e32966a0c0afd80f10.tar.bz2
caelestia-shell-d2373e03a5cbd0cb97e9c5e32966a0c0afd80f10.zip
controlcenter: FIXED animation bug with sub-text
Diffstat (limited to 'components')
-rw-r--r--components/controls/CollapsibleSection.qml80
1 files changed, 12 insertions, 68 deletions
diff --git a/components/controls/CollapsibleSection.qml b/components/controls/CollapsibleSection.qml
index aa206ba..35acdec 100644
--- a/components/controls/CollapsibleSection.qml
+++ b/components/controls/CollapsibleSection.qml
@@ -68,74 +68,6 @@ ColumnLayout {
}
}
- Item {
- Layout.fillWidth: true
- Layout.preferredHeight: (root.expanded && root.description !== "") ? Math.min(descriptionText.implicitHeight + Appearance.spacing.smaller + Appearance.spacing.small, maxDescriptionHeight) : 0
-
- readonly property real maxDescriptionHeight: 60
-
- layer.enabled: true
- layer.smooth: true
- layer.effect: OpacityMask {
- maskSource: descriptionMask
- }
-
- Behavior on Layout.preferredHeight {
- Anim {
- easing.bezierCurve: Appearance.anim.curves.standard
- }
- }
-
- Item {
- id: descriptionMask
- anchors.fill: parent
- layer.enabled: true
- visible: false
-
- Rectangle {
- anchors.fill: parent
-
- gradient: Gradient {
- orientation: Gradient.Vertical
-
- GradientStop {
- position: 0.0
- color: Qt.rgba(0, 0, 0, 1)
- }
- GradientStop {
- position: 0.7
- color: Qt.rgba(0, 0, 0, 1)
- }
- GradientStop {
- position: 1.0
- color: Qt.rgba(0, 0, 0, 0)
- }
- }
- }
- }
-
- 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
- wrapMode: Text.Wrap
- opacity: (root.expanded && root.description !== "") ? 1.0 : 0.0
-
- Behavior on opacity {
- Anim {
- easing.bezierCurve: Appearance.anim.curves.standard
- }
- }
- }
- }
-
default property alias content: contentColumn.data
Item {
@@ -166,6 +98,18 @@ ColumnLayout {
easing.bezierCurve: Appearance.anim.curves.standard
}
}
+
+ StyledText {
+ id: descriptionText
+ Layout.fillWidth: true
+ Layout.topMargin: root.description !== "" ? Appearance.spacing.smaller : 0
+ Layout.bottomMargin: root.description !== "" ? Appearance.spacing.small : 0
+ visible: root.description !== ""
+ text: root.description
+ color: Colours.palette.m3onSurfaceVariant
+ font.pointSize: Appearance.font.size.small
+ wrapMode: Text.Wrap
+ }
}
}
}