Skip to content

feat(themes): add built-in theme support for overlay - #66

Open
hikaps wants to merge 2 commits into
developfrom
feat/theme-support
Open

feat(themes): add built-in theme support for overlay#66
hikaps wants to merge 2 commits into
developfrom
feat/theme-support

Conversation

@hikaps

@hikaps hikaps commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

Adds theming support to the overlay (issue #54, v1: built-in themes). All hardcoded overlay colors are extracted into a semantic brush-key ResourceDictionary, and four built-in themes are selectable in settings.

Changes

  • Themes/Default.xaml — the current dark appearance, as semantic brush keys
  • Themes/Light.xaml — light surfaces/dark text
  • Themes/Minimal.xaml — near-monochrome with muted accents
  • Themes/Vibrant.xaml — saturated cyan/purple/red accents on blue-tinted dark
  • Themes/ThemeManager.cs — resolves theme names (case-insensitive, fallback to Default), loads compiled dictionaries via pack URI, applies to window before InitializeComponent, resolves brushes for code-behind use
  • OverlayWindow.xaml — ~77 inline color sites converted to {DynamicResource} references (surfaces, text tiers, focus borders, all three accent families with hover/pressed variants)
  • OverlayWindow.xaml.cs — theme applied in constructor; hardcoded brushes (section focus highlight, achievement gold/muted text, shortcut button factory) replaced with themed lookups; new themeName constructor param
  • OverlaySettings.cs / OverlaySettingsView.xaml / OverlaySettingsViewModel.csThemeName setting, Appearance group box with theme combo, validation against built-in theme list
  • OverlayService.cs — passes the selected theme into the window
  • tests/ThemeManagerTests.cs — name resolution, XAML key coverage vs Default, key-set consistency across all themes

Design

  • 34 semantic brush keys (surfaces, text tiers, accents + hover/pressed variants). DynamicResource (not StaticResource) so themes can be swapped at runtime without re-creating the window.
  • Theme dictionaries are compiled Pages in the OverlayPlugin assembly; loaded via /OverlayPlugin;component/Themes/{Name}.xaml.
  • Unknown/empty theme names fall back to Default; settings validation prevents persisting an invalid name.

Testing

  • Unit tests: ResolveThemeName normalization, every {DynamicResource} key in OverlayWindow.xaml exists in Default, all four theme dictionaries define the identical key set.
  • Manual (Windows): open settings → Appearance → pick each theme, open the overlay, verify colors change and no XAML resource errors in the log.

Closes #54

hikaps added 2 commits August 4, 2026 14:39
Extract all hardcoded overlay colors into semantic brush keys in a
compiled ResourceDictionary and add four built-in themes (Default,
Light, Minimal, Vibrant) selectable in settings.

- Add ThemeManager to resolve/apply theme dictionaries at window
  creation (before InitializeComponent so DynamicResource resolves)
- Convert ~77 inline color sites in OverlayWindow.xaml to
  {DynamicResource} references
- Replace code-behind hardcoded brushes (section focus, achievement
  text, shortcut button factory) with themed lookups
- Add ThemeName setting + Appearance group box in settings view
- Add tests: theme name resolution, XAML key coverage vs Default,
  key-set consistency across all themes

Closes #54
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