Skip to content

Support light and dark mode in the scanning panels - #1214

Merged
enaboapps merged 4 commits into
mainfrom
feat/1213-panel-theme
Oct 27, 2026
Merged

enaboapps merged 4 commits into
mainfrom
feat/1213-panel-theme

Conversation

@enaboapps

@enaboapps enaboapps commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1213

What changes

  • New shared Panel theme choice in scanning Appearance: Match system (default), Light or Dark. It colours the keyboard, the mouse panel, Home and the action menus.
  • Match system reads the main window's theme at startup and on every ThemeChanged event. Each tile carries its resolved appearance, so the next scan tick redraws the panels without a restart.
  • Light palette for the panel, menu bar band, key faces, borders and text. On light panels the scanner colour is a deeper shade so every highlight clears 3:1 on a white key; white becomes dark grey. The dark palette is byte-for-byte what shipped.
  • Windows GDI and macOS AppKit label painters take the text colour from the tile. The Windows painter now restores alpha after GDI text drawing, so dark labels composite correctly on the layered window (white text had only survived by accident).
  • Saved as panelTheme beside panelSize. Synced settings schema bumped 4 → 5 with an upgrade step that gives version 4 documents panelTheme: system; older installs reading a version 5 document are told to update. Unknown values fall back to Match system, and an area can never override it.
  • The settings sample preview follows the chosen theme. Docs site Appearance section updated.

Validation

  • npm run lint, npm test (310 vitest + 19 node), npm run build: pass.
  • cargo fmt --check, cargo clippy --all-targets -D warnings, cargo test (840 passed): pass.
  • macOS clippy (aarch64-apple-darwin, type-check only from Windows): pass.
  • site builds.
  • export_panel_size_fixtures exports each panel in both themes through the real Windows text renderer. Medium and Small mouse and Medium keyboard, light and dark, checked by eye.
  • Three independent review rounds; all actionable findings addressed (schema bump, yellow contrast, Windows text alpha).

Not covered here: a real macOS run, and a live system theme flip while panels are open.

🤖 Generated with Claude Code

The keyboard, the mouse panel, Home and the action menus now follow a
shared Panel theme in scanning Appearance: Match system, Light or Dark.
Match system reads the main window's theme at startup and on every
ThemeChanged event, and each tile carries its resolved appearance so the
next tick redraws it. Light panels use a deeper shade of the scanner
colour, with white drawn as dark grey, so highlights stay visible.

Closes #1213

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@enaboapps enaboapps added this to the v1.2.0 milestone Oct 27, 2026
@vercel

vercel Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
site Ready Ready Preview Oct 27, 2026 11:22am UTC

Request Review

Keeps text_rgb in use on every platform so the macOS build has no dead code.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Synced documents round-trip exactly, so a new scan preference needs a
schema step: version 4 documents gain panelTheme: system on the way in,
and older installs are told to update instead of seeing an invalid
document. The light-panel yellow highlight is darker so it clears 3:1
against a white key.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
GDI writes text pixels with alpha 0, which the premultiplied layered
window adds to whatever is behind the panel. White text got away with
it; dark text on light panels would vanish over a light window. Copy the
source alpha back after drawing, in production as well as in fixtures.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@enaboapps
enaboapps marked this pull request as ready for review October 27, 2026 11:25
@enaboapps
enaboapps merged commit 3415200 into main Oct 27, 2026
10 checks passed
@enaboapps
enaboapps deleted the feat/1213-panel-theme branch October 27, 2026 11:53

This branch was successfully deployed

1 active deployment
Preview — add02d6c Deployed Oct 27, 2026 by vercel[bot]
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.

Support light and dark mode in the scanning panels

2 participants