summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-10 18:49:10 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-10 18:49:10 +1000
commit89bb77401207d3b322aa2cabff116cc79d6897e1 (patch)
tree5b304702434df6e561d77fa8e16a11e5c8fc8579 /modules
parentnotifs: fix first notif open anim (diff)
downloadcaelestia-shell-89bb77401207d3b322aa2cabff116cc79d6897e1.tar.gz
caelestia-shell-89bb77401207d3b322aa2cabff116cc79d6897e1.tar.bz2
caelestia-shell-89bb77401207d3b322aa2cabff116cc79d6897e1.zip
refactor: manually animate rect if needed
No need for animate prop, it's used too little so just manually set it if needed to save memory
Diffstat (limited to 'modules')
-rw-r--r--modules/bar/components/ActiveWindow.qml17
-rw-r--r--modules/bar/components/StatusIcons.qml17
-rw-r--r--modules/bar/components/Tray.qml17
3 files changed, 48 insertions, 3 deletions
diff --git a/modules/bar/components/ActiveWindow.qml b/modules/bar/components/ActiveWindow.qml
index eeea3ac..0e24242 100644
--- a/modules/bar/components/ActiveWindow.qml
+++ b/modules/bar/components/ActiveWindow.qml
@@ -11,7 +11,6 @@ StyledRect {
property color colour: Colours.palette.pink
- animate: true
clip: true
MaterialIcon {
@@ -53,4 +52,20 @@ StyledRect {
elide: Qt.ElideRight
elideWidth: root.vertical ? BarConfig.sizes.maxLabelHeight : BarConfig.sizes.maxLabelWidth
}
+
+ Behavior on implicitWidth {
+ NumberAnimation {
+ duration: Appearance.anim.durations.normal
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.emphasized
+ }
+ }
+
+ Behavior on implicitHeight {
+ NumberAnimation {
+ duration: Appearance.anim.durations.normal
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.emphasized
+ }
+ }
}
diff --git a/modules/bar/components/StatusIcons.qml b/modules/bar/components/StatusIcons.qml
index cb5dc58..62823e0 100644
--- a/modules/bar/components/StatusIcons.qml
+++ b/modules/bar/components/StatusIcons.qml
@@ -10,7 +10,6 @@ StyledRect {
property color colour: Colours.palette.rosewater
- animate: true
clip: true
MaterialIcon {
@@ -58,4 +57,20 @@ StyledRect {
}
}
}
+
+ Behavior on implicitWidth {
+ NumberAnimation {
+ duration: Appearance.anim.durations.normal
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.emphasized
+ }
+ }
+
+ Behavior on implicitHeight {
+ NumberAnimation {
+ duration: Appearance.anim.durations.normal
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.emphasized
+ }
+ }
}
diff --git a/modules/bar/components/Tray.qml b/modules/bar/components/Tray.qml
index a635b76..ccebe1f 100644
--- a/modules/bar/components/Tray.qml
+++ b/modules/bar/components/Tray.qml
@@ -9,7 +9,6 @@ StyledRect {
property color colour: Colours.palette.lavender
- animate: true
clip: true
visible: width > 0 && height > 0 // To avoid warnings about being visible with no size
@@ -22,4 +21,20 @@ StyledRect {
}
}
}
+
+ Behavior on implicitWidth {
+ NumberAnimation {
+ duration: Appearance.anim.durations.normal
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.emphasized
+ }
+ }
+
+ Behavior on implicitHeight {
+ NumberAnimation {
+ duration: Appearance.anim.durations.normal
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.emphasized
+ }
+ }
}