summaryrefslogtreecommitdiff
path: root/modules/launcher/Wrapper.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-13 23:12:23 +0800
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-13 23:12:23 +0800
commitf8eb1b69a034f4aa2833271a0c6b999cfe2a477e (patch)
tree012e14e3e6fbb890a7fbabc70e19e9f65d160400 /modules/launcher/Wrapper.qml
parentsession: show/hide on drag (diff)
downloadcaelestia-shell-f8eb1b69a034f4aa2833271a0c6b999cfe2a477e.tar.gz
caelestia-shell-f8eb1b69a034f4aa2833271a0c6b999cfe2a477e.tar.bz2
caelestia-shell-f8eb1b69a034f4aa2833271a0c6b999cfe2a477e.zip
launcher: move to drawers
Diffstat (limited to 'modules/launcher/Wrapper.qml')
-rw-r--r--modules/launcher/Wrapper.qml55
1 files changed, 24 insertions, 31 deletions
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
+ }
}