From f8eb1b69a034f4aa2833271a0c6b999cfe2a477e Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 13 May 2025 23:12:23 +0800 Subject: launcher: move to drawers --- modules/launcher/Wrapper.qml | 55 +++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 31 deletions(-) (limited to 'modules/launcher/Wrapper.qml') diff --git a/modules/launcher/Wrapper.qml b/modules/launcher/Wrapper.qml index 2782d1b..c997781 100644 --- a/modules/launcher/Wrapper.qml +++ b/modules/launcher/Wrapper.qml @@ -1,23 +1,22 @@ import "root:/config" +import Quickshell import QtQuick Item { id: root - required property bool launcherVisible - required property real contentHeight - property bool shouldBeVisible + required property PersistentProperties visibilities visible: height > 0 - height: 0 + implicitHeight: 0 + implicitWidth: content.width + BorderConfig.rounding * 2 states: State { name: "visible" - when: root.launcherVisible + when: root.visibilities.launcher PropertyChanges { - root.height: contentHeight - root.shouldBeVisible: true + root.implicitHeight: content.height } } @@ -26,37 +25,31 @@ Item { from: "" to: "visible" - SequentialAnimation { - PropertyAction { - target: root - property: "shouldBeVisible" - } - NumberAnimation { - target: root - property: "height" - duration: Appearance.anim.durations.large - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.emphasizedDecel - } + NumberAnimation { + target: root + property: "implicitHeight" + duration: Appearance.anim.durations.large + easing.type: Easing.BezierSpline + easing.bezierCurve: Appearance.anim.curves.emphasizedDecel } }, Transition { from: "visible" to: "" - SequentialAnimation { - NumberAnimation { - target: root - property: "height" - duration: Appearance.anim.durations.normal - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.emphasizedAccel - } - PropertyAction { - target: root - property: "shouldBeVisible" - } + 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 + } } -- cgit v1.2.3-freya