diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-24 17:22:00 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-24 17:22:00 +1000 |
| commit | 6e8a32d4e40e25e1c077394f1638a43176ebf9ed (patch) | |
| tree | 26704741e0c3a41a9ca461c7bc148f58553bf8f7 /components/controls | |
| parent | internal: add canim component (diff) | |
| download | caelestia-shell-6e8a32d4e40e25e1c077394f1638a43176ebf9ed.tar.gz caelestia-shell-6e8a32d4e40e25e1c077394f1638a43176ebf9ed.tar.bz2 caelestia-shell-6e8a32d4e40e25e1c077394f1638a43176ebf9ed.zip | |
internal: use Anim component
Diffstat (limited to 'components/controls')
| -rw-r--r-- | components/controls/FilledSlider.qml | 10 | ||||
| -rw-r--r-- | components/controls/StyledBusyIndicator.qml | 5 | ||||
| -rw-r--r-- | components/controls/StyledScrollBar.qml | 6 | ||||
| -rw-r--r-- | components/controls/StyledSwitch.qml | 12 | ||||
| -rw-r--r-- | components/controls/StyledTextField.qml | 4 |
5 files changed, 10 insertions, 27 deletions
diff --git a/components/controls/FilledSlider.qml b/components/controls/FilledSlider.qml index af60e9f..4ddbfda 100644 --- a/components/controls/FilledSlider.qml +++ b/components/controls/FilledSlider.qml @@ -80,25 +80,23 @@ Slider { Behavior on moving { SequentialAnimation { - NumberAnimation { + Anim { target: icon property: "scale" from: 1 to: 0 duration: Appearance.anim.durations.normal / 2 - easing.type: Easing.BezierSpline easing.bezierCurve: Appearance.anim.curves.standardAccel } ScriptAction { script: icon.update() } - NumberAnimation { + Anim { target: icon property: "scale" from: 0 to: 1 duration: Appearance.anim.durations.normal / 2 - easing.type: Easing.BezierSpline easing.bezierCurve: Appearance.anim.curves.standardDecel } } @@ -128,10 +126,8 @@ Slider { } Behavior on value { - NumberAnimation { + Anim { duration: Appearance.anim.durations.large - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.standard } } } diff --git a/components/controls/StyledBusyIndicator.qml b/components/controls/StyledBusyIndicator.qml index cc97c52..9fd1c3e 100644 --- a/components/controls/StyledBusyIndicator.qml +++ b/components/controls/StyledBusyIndicator.qml @@ -1,3 +1,4 @@ +import ".." import qs.services import qs.config import QtQuick @@ -39,11 +40,9 @@ BusyIndicator { } transitions: Transition { - NumberAnimation { + Anim { properties: "opacity,internalStrokeWidth" duration: updater.completeEndDuration - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.standard } } diff --git a/components/controls/StyledScrollBar.qml b/components/controls/StyledScrollBar.qml index 61ddc6d..69a01f3 100644 --- a/components/controls/StyledScrollBar.qml +++ b/components/controls/StyledScrollBar.qml @@ -14,11 +14,7 @@ ScrollBar { color: Colours.palette.m3secondary Behavior on opacity { - NumberAnimation { - duration: Appearance.anim.durations.normal - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.standard - } + Anim {} } } diff --git a/components/controls/StyledSwitch.qml b/components/controls/StyledSwitch.qml index af5c07d..ecc1076 100644 --- a/components/controls/StyledSwitch.qml +++ b/components/controls/StyledSwitch.qml @@ -39,7 +39,7 @@ Switch { opacity: root.pressed ? 0.1 : root.hovered ? 0.08 : 0 Behavior on opacity { - NumberAnim {} + Anim {} } } @@ -129,11 +129,11 @@ Switch { } Behavior on x { - NumberAnim {} + Anim {} } Behavior on implicitWidth { - NumberAnim {} + Anim {} } } } @@ -144,12 +144,6 @@ Switch { enabled: false } - component NumberAnim: NumberAnimation { - duration: Appearance.anim.durations.normal - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.standard - } - component PropAnim: PropertyAnimation { duration: Appearance.anim.durations.normal easing.type: Easing.BezierSpline diff --git a/components/controls/StyledTextField.qml b/components/controls/StyledTextField.qml index 7817799..4db87e9 100644 --- a/components/controls/StyledTextField.qml +++ b/components/controls/StyledTextField.qml @@ -60,10 +60,8 @@ TextField { } Behavior on opacity { - NumberAnimation { + Anim { duration: Appearance.anim.durations.small - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.standard } } } |