summaryrefslogtreecommitdiff
path: root/components/controls
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-12 19:17:35 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-12 19:17:35 +1000
commit56f6150ec92fb6d07ee72394ffdb37dc5ccc7b26 (patch)
treec734ee2a6f7443065a56b363bb852f0458ecc245 /components/controls
parentreadme: update example config (diff)
downloadcaelestia-shell-56f6150ec92fb6d07ee72394ffdb37dc5ccc7b26.tar.gz
caelestia-shell-56f6150ec92fb6d07ee72394ffdb37dc5ccc7b26.tar.bz2
caelestia-shell-56f6150ec92fb6d07ee72394ffdb37dc5ccc7b26.zip
internal: fix crash
Diffstat (limited to 'components/controls')
-rw-r--r--components/controls/FilledSlider.qml53
1 files changed, 31 insertions, 22 deletions
diff --git a/components/controls/FilledSlider.qml b/components/controls/FilledSlider.qml
index f095a7d..4bf721a 100644
--- a/components/controls/FilledSlider.qml
+++ b/components/controls/FilledSlider.qml
@@ -69,7 +69,7 @@ Slider {
function update(): void {
animate = !moving;
- text = moving ? Qt.binding(() => Math.round(root.value * 100)) : Qt.binding(() => root.icon);
+ binding.when = moving;
font.pointSize = moving ? Appearance.font.size.small : Appearance.font.size.larger;
font.family = moving ? Appearance.font.family.sans : Appearance.font.family.material;
}
@@ -78,27 +78,36 @@ Slider {
color: Colours.palette.m3inverseOnSurface
anchors.centerIn: parent
- Behavior on moving {
- SequentialAnimation {
- Anim {
- target: icon
- property: "scale"
- from: 1
- to: 0
- duration: Appearance.anim.durations.normal / 2
- easing.bezierCurve: Appearance.anim.curves.standardAccel
- }
- ScriptAction {
- script: icon.update()
- }
- Anim {
- target: icon
- property: "scale"
- from: 0
- to: 1
- duration: Appearance.anim.durations.normal / 2
- easing.bezierCurve: Appearance.anim.curves.standardDecel
- }
+ onMovingChanged: anim.restart()
+
+ Binding {
+ id: binding
+
+ target: icon
+ property: "text"
+ value: Math.round(root.value * 100)
+ when: false
+ }
+
+ SequentialAnimation {
+ id: anim
+
+ Anim {
+ target: icon
+ property: "scale"
+ to: 0
+ duration: Appearance.anim.durations.normal / 2
+ easing.bezierCurve: Appearance.anim.curves.standardAccel
+ }
+ ScriptAction {
+ script: icon.update()
+ }
+ Anim {
+ target: icon
+ property: "scale"
+ to: 1
+ duration: Appearance.anim.durations.normal / 2
+ easing.bezierCurve: Appearance.anim.curves.standardDecel
}
}
}