diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-27 11:21:59 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-27 11:21:59 +1000 |
| commit | c1f49c1fed722c60731967ca1b9a8b963a971586 (patch) | |
| tree | 9c9971c01e85a319966d6a7576be3050a80ad3f6 | |
| parent | [CI] chore: update flake (diff) | |
| download | caelestia-shell-c1f49c1fed722c60731967ca1b9a8b963a971586.tar.gz caelestia-shell-c1f49c1fed722c60731967ca1b9a8b963a971586.tar.bz2 caelestia-shell-c1f49c1fed722c60731967ca1b9a8b963a971586.zip | |
brightness: fix
| -rw-r--r-- | services/Brightness.qml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/services/Brightness.qml b/services/Brightness.qml index 86f1202..cbd1739 100644 --- a/services/Brightness.qml +++ b/services/Brightness.qml @@ -86,7 +86,7 @@ Singleton { readonly property string busNum: root.ddcMonitors.find(m => m.model === modelData.model)?.busNum ?? "" readonly property bool isAppleDisplay: root.appleDisplayPresent && modelData.model.startsWith("StudioDisplay") property real brightness - property real queuedBrightness + property real queuedBrightness: NaN readonly property Process initProc: Process { stdout: StdioCollector { @@ -104,7 +104,12 @@ Singleton { readonly property Timer timer: Timer { interval: 500 - onTriggered: monitor.setBrightness(monitor.queuedBrightness) + onTriggered: { + if (!isNaN(monitor.queuedBrightness)) { + monitor.setBrightness(monitor.queuedBrightness); + monitor.queuedBrightness = NaN; + } + } } function setBrightness(value: real): void { |