diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-10 12:59:10 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-10 12:59:10 +1000 |
| commit | 6eb216475658dda3f921b176ffd6740fc65784ce (patch) | |
| tree | 0a9e26048df28928399f14fa0359ad85b9bf78e9 /modules/utilities/Wrapper.qml | |
| parent | lock: fix input dragging (diff) | |
| download | caelestia-shell-6eb216475658dda3f921b176ffd6740fc65784ce.tar.gz caelestia-shell-6eb216475658dda3f921b176ffd6740fc65784ce.tar.bz2 caelestia-shell-6eb216475658dda3f921b176ffd6740fc65784ce.zip | |
internal: add utilities panel base
Diffstat (limited to 'modules/utilities/Wrapper.qml')
| -rw-r--r-- | modules/utilities/Wrapper.qml | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/modules/utilities/Wrapper.qml b/modules/utilities/Wrapper.qml new file mode 100644 index 0000000..3d1d50a --- /dev/null +++ b/modules/utilities/Wrapper.qml @@ -0,0 +1,52 @@ +import "root:/config" +import QtQuick + +Item { + id: root + + required property bool visibility + + visible: height > 0 + implicitHeight: 0 + implicitWidth: content.implicitWidth + + states: State { + name: "visible" + when: root.visibility + + PropertyChanges { + root.implicitHeight: content.implicitHeight + } + } + + transitions: [ + Transition { + from: "" + to: "visible" + + NumberAnimation { + target: root + property: "implicitHeight" + duration: Appearance.anim.durations.expressiveDefaultSpatial + easing.type: Easing.BezierSpline + easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial + } + }, + Transition { + from: "visible" + to: "" + + NumberAnimation { + target: root + property: "implicitHeight" + duration: Appearance.anim.durations.normal + easing.type: Easing.BezierSpline + easing.bezierCurve: Appearance.anim.curves.emphasized + } + } + ] + + Content { + id: content + } +} |