diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-12 17:15:55 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-12 17:15:55 +1000 |
| commit | d06d8b870f8cd2cc15d891412a5129bfc6117e09 (patch) | |
| tree | c80d9a7bbdccf7a58ee7ab1e91d010224f60168a /components/controls/FilledSlider.qml | |
| parent | dashboard: persist state (diff) | |
| download | caelestia-shell-d06d8b870f8cd2cc15d891412a5129bfc6117e09.tar.gz caelestia-shell-d06d8b870f8cd2cc15d891412a5129bfc6117e09.tar.bz2 caelestia-shell-d06d8b870f8cd2cc15d891412a5129bfc6117e09.zip | |
osd: loader content
Diffstat (limited to 'components/controls/FilledSlider.qml')
| -rw-r--r-- | components/controls/FilledSlider.qml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/components/controls/FilledSlider.qml b/components/controls/FilledSlider.qml index 4ddbfda..f095a7d 100644 --- a/components/controls/FilledSlider.qml +++ b/components/controls/FilledSlider.qml @@ -10,6 +10,7 @@ Slider { required property string icon property real oldValue + property bool initialized orientation: Qt.Vertical @@ -32,7 +33,7 @@ Slider { handle: Item { id: handle - property bool moving + property alias moving: icon.moving y: root.visualPosition * (root.availableHeight - height) implicitWidth: root.width @@ -64,7 +65,7 @@ Slider { MaterialIcon { id: icon - property bool moving: handle.moving + property bool moving function update(): void { animate = !moving; @@ -73,7 +74,6 @@ Slider { font.family = moving ? Appearance.font.family.sans : Appearance.font.family.material; } - animate: true text: root.icon color: Colours.palette.m3inverseOnSurface anchors.centerIn: parent @@ -108,6 +108,10 @@ Slider { onPressedChanged: handle.moving = pressed onValueChanged: { + if (!initialized) { + initialized = true; + return; + } if (Math.abs(value - oldValue) < 0.01) return; oldValue = value; |