From 6eb216475658dda3f921b176ffd6740fc65784ce Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 10 Jul 2025 12:59:10 +1000 Subject: internal: add utilities panel base --- modules/utilities/Wrapper.qml | 52 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 modules/utilities/Wrapper.qml (limited to 'modules/utilities/Wrapper.qml') 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 + } +} -- cgit v1.2.3-freya