diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-17 00:44:00 +0800 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-17 00:44:00 +0800 |
| commit | 6e6db08726e3bc274594de6835a01fc10002def9 (patch) | |
| tree | 272dcaa27b96690c449cdf61c8e4e6ea21559f48 /modules/dashboard/Wrapper.qml | |
| parent | launcher: fallback app icon (diff) | |
| download | caelestia-shell-6e6db08726e3bc274594de6835a01fc10002def9.tar.gz caelestia-shell-6e6db08726e3bc274594de6835a01fc10002def9.tar.bz2 caelestia-shell-6e6db08726e3bc274594de6835a01fc10002def9.zip | |
feat: dashboard
Diffstat (limited to 'modules/dashboard/Wrapper.qml')
| -rw-r--r-- | modules/dashboard/Wrapper.qml | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/modules/dashboard/Wrapper.qml b/modules/dashboard/Wrapper.qml new file mode 100644 index 0000000..c4388e6 --- /dev/null +++ b/modules/dashboard/Wrapper.qml @@ -0,0 +1,58 @@ +import QtQuick +import Quickshell +import "root:/config" + +Item { + id: root + + required property PersistentProperties visibilities + + visible: height > 0 + implicitHeight: 0 + implicitWidth: content.width + BorderConfig.rounding * 2 + transitions: [ + Transition { + from: "" + to: "visible" + + NumberAnimation { + target: root + property: "implicitHeight" + duration: Appearance.anim.durations.large + easing.type: Easing.BezierSpline + easing.bezierCurve: Appearance.anim.curves.emphasizedDecel + } + + }, + Transition { + from: "visible" + to: "" + + NumberAnimation { + target: root + property: "implicitHeight" + duration: Appearance.anim.durations.normal + easing.type: Easing.BezierSpline + easing.bezierCurve: Appearance.anim.curves.emphasizedAccel + } + + } + ] + + Content { + id: content + + visibilities: root.visibilities + } + + states: State { + name: "visible" + when: root.visibilities.dashboard + + PropertyChanges { + root.implicitHeight: content.height + } + + } + +} |