diff options
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 + } + + } + +} |