summaryrefslogtreecommitdiff
path: root/modules/osd/Wrapper.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-04 20:45:34 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-04 20:45:34 +1000
commitfb471f1023ab4991c124d0bc432028d95d7b7300 (patch)
tree6e46278fabc8f4b584cd668703bfe28e3d78ec8d /modules/osd/Wrapper.qml
parentappearance: better on colours (diff)
downloadcaelestia-shell-fb471f1023ab4991c124d0bc432028d95d7b7300.tar.gz
caelestia-shell-fb471f1023ab4991c124d0bc432028d95d7b7300.tar.bz2
caelestia-shell-fb471f1023ab4991c124d0bc432028d95d7b7300.zip
feat: audio osd
Diffstat (limited to 'modules/osd/Wrapper.qml')
-rw-r--r--modules/osd/Wrapper.qml62
1 files changed, 62 insertions, 0 deletions
diff --git a/modules/osd/Wrapper.qml b/modules/osd/Wrapper.qml
new file mode 100644
index 0000000..92bd3c2
--- /dev/null
+++ b/modules/osd/Wrapper.qml
@@ -0,0 +1,62 @@
+import "root:/config"
+import QtQuick
+
+Item {
+ id: root
+
+ required property bool osdVisible
+ required property real contentWidth
+ property bool shouldBeVisible
+
+ width: 0
+ clip: true
+
+ states: State {
+ name: "visible"
+ when: root.osdVisible
+
+ PropertyChanges {
+ root.width: contentWidth
+ root.shouldBeVisible: true
+ }
+ }
+
+ transitions: [
+ Transition {
+ from: ""
+ to: "visible"
+
+ SequentialAnimation {
+ PropertyAction {
+ target: root
+ property: "shouldBeVisible"
+ }
+ NumberAnimation {
+ target: root
+ property: "width"
+ duration: Appearance.anim.durations.large
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.emphasizedDecel
+ }
+ }
+ },
+ Transition {
+ from: "visible"
+ to: ""
+
+ SequentialAnimation {
+ NumberAnimation {
+ target: root
+ property: "width"
+ duration: Appearance.anim.durations.normal
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.emphasizedAccel
+ }
+ PropertyAction {
+ target: root
+ property: "shouldBeVisible"
+ }
+ }
+ }
+ ]
+}