Skip to content

Fix settings toggle overflow + hotkey capture, add theme picker (v0.1.12)#16

Merged
archdex-art merged 1 commit into
mainfrom
fix/settings-toggle-hotkey-theme
Jul 16, 2026
Merged

Fix settings toggle overflow + hotkey capture, add theme picker (v0.1.12)#16
archdex-art merged 1 commit into
mainfrom
fix/settings-toggle-hotkey-theme

Conversation

@archdex-art

Copy link
Copy Markdown
Owner

Fixes

  • Toggle switch thumb overflowed its track. Toggle's knob <span> had no left anchor, so the browser's static-position fallback rendered it flush against — and partly outside — the track's right edge when checked. Added left-0 so translate-x-[3px]/translate-x-[19px] are relative to a known origin. Verified via getBoundingClientRect: thumb now sits a consistent 3px inset on both states.

  • Global hotkey capture never saw keystrokes. The bound toggle shortcut stays registered as an OS-level global hotkey the entire time the settings window is open. Pressing that combo (or anything already intercepted) while recording a new one never reached the capture keydown listener — the OS grabbed it first, so "Listening…" looked permanently stuck. Added suspend_toggle_shortcut/resume_toggle_shortcut Tauri commands; the settings window suspends the active hotkey for the duration of a capture session and re-arms it on cancel/failure/unmount (a successful capture re-registers the new combo instead, via the existing update_settingsrebind_toggle path).

Added

  • Base theme selector. Appearance now has a Dark/Light theme picker alongside the existing Accent Color swatches, independent of it. New ink/canvas Tailwind colors backed by CSS variables (--ink-rgb, --canvas-rgb) replace every hardcoded white/* / hsl(32,14%,7%) token across the settings window; theme.ts:applyTheme() flips them via a data-theme attribute, so switching themes repaints the whole window live, no reload.

Verification

  • tsc --noEmit clean, cargo check clean.
  • Drove the settings UI against the Vite dev server in a real browser: confirmed toggle thumb geometry pre/post fix via getBoundingClientRect, confirmed keystroke capture round-trips correctly, and screenshotted General/Appearance/Extensions in both themes for full contrast/legibility.
  • Bumped src-tauri/tauri.conf.json + Cargo.toml to 0.1.12, added CHANGELOG entry.

….12)

- Toggle switch thumb missing left-0 rendered outside its track.
- Global hotkey capture never saw keystrokes matching the currently
  bound combo, since the OS-level global shortcut intercepted it first;
  now suspended for the duration of a capture session and re-armed on
  cancel/failure/unmount.
- Appearance pane gains a Dark/Light theme picker alongside the existing
  accent color swatches, backed by new ink/canvas CSS variables so every
  settings-window surface repaints live.
- Bump to v0.1.12, changelog entry.
@archdex-art
archdex-art merged commit 3d2614f into main Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant