keep the dark theme when windows is in light mode #44

Manually merged
github merged 1 commit from gh-pr/44/head into gh-pr/44/base 2026-11-27 02:32:37 +00:00
Owner

@⁠asm512 on GitHub · 2026-11-22 20:21 UTC · original
asm512:dark-theme-light-mode → main · +14 −0 · 1 files · 1 commits · merged 2026-11-22 21:36 UTC

With Windows in light mode the app was close to unreadable: dark grey text on the dark purple panels.

setup_style installs the palette with ctx.set_visuals, which in egui 0.31 only changes the style of the current theme. At startup that is the dark one, then egui follows the system theme and switches to its stock light style (dark text) on top of the app's dark backgrounds.

The fix pins the theme to dark before the palette is set.

Testing

  • New test runs a frame with a light system theme and checks the palette is still the dark one. It fails without the fix.
  • cargo test --release: 102 pass. vehicle_texture_layers_toggle fails with PERCYSTAR_LEVELS_RPF set, on main without this change as well (22 textured materials, the test expects 19).
**@⁠asm512** on GitHub · 2026-11-22 20:21 UTC · [original](https://github.com/rpatty-dev/PercyStar/pull/44) `asm512:dark-theme-light-mode` → `main` · +14 −0 · 1 files · 1 commits · merged 2026-11-22 21:36 UTC With Windows in light mode the app was close to unreadable: dark grey text on the dark purple panels. `setup_style` installs the palette with `ctx.set_visuals`, which in egui 0.31 only changes the style of the current theme. At startup that is the dark one, then egui follows the system theme and switches to its stock light style (dark text) on top of the app's dark backgrounds. The fix pins the theme to dark before the palette is set. **Testing** - New test runs a frame with a light system theme and checks the palette is still the dark one. It fails without the fix. - `cargo test --release`: 102 pass. `vehicle_texture_layers_toggle` fails with `PERCYSTAR_LEVELS_RPF` set, on main without this change as well (22 textured materials, the test expects 19).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 02:32:36 +00:00
github manually merged commit af477d54a0 into gh-pr/44/base 2026-11-27 02:32:37 +00:00
Author
Owner

@⁠rpatty-dev on GitHub · 2026-11-22 21:36 UTC · original

Merged and verified (cargo test --release: 120 passed). Thanks for fixing Windows light-mode theme handling!

**@⁠rpatty-dev** on GitHub · 2026-11-22 21:36 UTC · [original](https://github.com/rpatty-dev/PercyStar/pull/44#issuecomment-7086183922) Merged and verified (cargo test --release: 120 passed). Thanks for fixing Windows light-mode theme handling!
This discussion has been locked. Commenting is limited to contributors.
No description provided.