ddcutil-service usage

This commit is contained in:
Zacharias-Brohn
2026-02-28 00:23:29 +01:00
parent 178375d861
commit 65adecfa21
2 changed files with 31 additions and 15 deletions
+16 -15
View File
@@ -4,6 +4,7 @@ import qs.Config
Item {
id: root
property alias anim: marqueeAnim
property bool animate: false
property color color: DynamicColors.palette.m3onSurface
property int fadeStrengthAnimMs: 180
@@ -29,13 +30,11 @@ Item {
}
function resetMarquee() {
// stop + reset all state immediately
marqueeAnim.stop();
strip.x = 0;
root.sliding = false;
root.leftFadeEnabled = false;
// restart after bindings/layout settle
if (root.marqueeEnabled && root.overflowing && root.visible) {
marqueeAnim.restart();
}
@@ -120,20 +119,9 @@ Item {
SequentialAnimation {
id: marqueeAnim
loops: Animation.Infinite
running: root.marqueeEnabled && root.overflowing && root.visible
running: false
ScriptAction {
script: {
strip.x = 0;
root.sliding = false;
root.leftFadeEnabled = false;
}
}
PauseAnimation {
duration: root.pauseMs
}
onFinished: pauseTimer.restart()
ScriptAction {
script: {
@@ -175,6 +163,19 @@ Item {
}
}
}
Timer {
id: pauseTimer
interval: root.pauseMs
repeat: false
running: true
onTriggered: {
if (root.marqueeEnabled)
marqueeAnim.start();
}
}
}
Rectangle {