Fix the Show keys toggle: flip the real paused state
ToggleSwitch does not flip checked on click — it only emits toggled() and the caller owns the value. Reading !checked there yielded the current bound state, so setPaused's guard always early-returned and the toggle never did anything. Flip !root.paused instead; the checked binding follows the flag file.
This commit is contained in:
@@ -153,7 +153,10 @@ Panel {
|
||||
checked: !root.paused
|
||||
foreground: Color.popups.text
|
||||
accent: Color.accent
|
||||
onToggled: root.setPaused(!checked)
|
||||
// ToggleSwitch does not flip `checked` itself — it only emits
|
||||
// toggled() and the caller owns the value. Flip the real state;
|
||||
// the checked binding follows.
|
||||
onToggled: root.setPaused(!root.paused)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user