diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-21 10:23:05 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-21 10:23:05 +0200 |
| commit | 77952289f8176703eef7134262c6fd6d0d835dd6 (patch) | |
| tree | 730b1d128b77b43be4ac4127740baee2d4c4b87b /desktop/modules/status/StatusRow.qml | |
| parent | 93f129ad1a2b59db8533cb7c86cee3c10417ba4f (diff) | |
| download | quickshell-77952289f8176703eef7134262c6fd6d0d835dd6.tar.gz quickshell-77952289f8176703eef7134262c6fd6d0d835dd6.zip | |
Switch: never set checked itself, report the new state instead
The shared Switch flipped its own checked on click, which replaced the
caller's binding with a constant. Every use binds checked, so after a
click the switch stopped following its source: Discard on a settings
draft reverted the value and left the switch showing the click. Four
status rows and the headphones panel each carried a resync workaround
for it.
toggled now carries the new state and the switch moves only when the
caller's binding does. Handlers that read checked as the new value take
the argument instead; the workarounds are gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/status/StatusRow.qml')
| -rw-r--r-- | desktop/modules/status/StatusRow.qml | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/desktop/modules/status/StatusRow.qml b/desktop/modules/status/StatusRow.qml index c9e78c0..c342e2b 100644 --- a/desktop/modules/status/StatusRow.qml +++ b/desktop/modules/status/StatusRow.qml @@ -53,9 +53,4 @@ Item { checked: row.value onToggled: Status.toggleMode(row.mode) } - - // The shared Switch's click handler writes `checked` directly, which drops - // the declarative binding above. Resync on any value change so an external - // write (statusctl, waybar) moves the switch back into agreement. - onValueChanged: sw.checked = row.value } |
