From 89bb77401207d3b322aa2cabff116cc79d6897e1 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 10 May 2025 18:49:10 +1000 Subject: 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 --- modules/bar/components/ActiveWindow.qml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'modules/bar/components/ActiveWindow.qml') 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 + } + } } -- cgit v1.2.3-freya