diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-30 23:26:16 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-30 23:26:16 +1000 |
| commit | 9339394e07bda1c51e0bc484d09e5419a6ad2d29 (patch) | |
| tree | 1958c2d36bd3af4ded227f94afce131fe3f9e040 /modules/bar/Bar.qml | |
| parent | colours: adjust layer brightness when transparent (diff) | |
| download | caelestia-shell-9339394e07bda1c51e0bc484d09e5419a6ad2d29.tar.gz caelestia-shell-9339394e07bda1c51e0bc484d09e5419a6ad2d29.tar.bz2 caelestia-shell-9339394e07bda1c51e0bc484d09e5419a6ad2d29.zip | |
bar: use loader instead of swipeview
Also properly set it up
Make network reloadable cause getting is pretty slow
Diffstat (limited to 'modules/bar/Bar.qml')
| -rw-r--r-- | modules/bar/Bar.qml | 63 |
1 files changed, 56 insertions, 7 deletions
diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml index 7608d49..5a2940f 100644 --- a/modules/bar/Bar.qml +++ b/modules/bar/Bar.qml @@ -1,11 +1,7 @@ import "root:/widgets" import "root:/config" -import "components" -import "components/workspaces" import Quickshell -import Quickshell.Wayland import QtQuick -import QtQuick.Controls Variants { model: Quickshell.screens @@ -41,11 +37,64 @@ Variants { // } // } - SwipeView { - anchors.fill: parent - currentIndex: 1 + Preset { + presetName: "pills" Pills {} } } + + component Preset: Loader { + id: loader + + required property string presetName + + anchors.fill: parent + asynchronous: true + active: false + opacity: 0 + + states: [ + State { + name: "visible" + when: BarConfig.preset.name === loader.presetName + + PropertyChanges { + loader.opacity: 1 + loader.active: true + } + } + ] + + transitions: [ + Transition { + from: "" + to: "visible" + + SequentialAnimation { + PropertyAction {} + NumberAnimation { + property: "opacity" + duration: Appearance.anim.durations.large + easing.type: Easing.BezierSpline + easing.bezierCurve: Appearance.anim.curves.standard + } + } + }, + Transition { + from: "visible" + to: "" + + SequentialAnimation { + NumberAnimation { + property: "opacity" + duration: Appearance.anim.durations.large + easing.type: Easing.BezierSpline + easing.bezierCurve: Appearance.anim.curves.standard + } + PropertyAction {} + } + } + ] + } } |