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:
felixzsh
2026-08-11 13:58:48 -05:00
parent ccce10d393
commit f255fa05e9
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -153,7 +153,10 @@ Panel {
checked: !root.paused checked: !root.paused
foreground: Color.popups.text foreground: Color.popups.text
accent: Color.accent 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)
} }
} }
+1 -1
View File
@@ -2,7 +2,7 @@
"schemaVersion": 1, "schemaVersion": 1,
"id": "felixzsh.key-visualizer", "id": "felixzsh.key-visualizer",
"name": "Key Visualizer", "name": "Key Visualizer",
"version": "1.3.1", "version": "1.3.2",
"description": "Shows the keys you press on screen. Great for keybinding tutorials, demos, and screencasts.", "description": "Shows the keys you press on screen. Great for keybinding tutorials, demos, and screencasts.",
"kinds": [ "kinds": [
"panel", "panel",