lepoco / lepoco/wpfui

[Bug] SystemThemeWatcher is not working properly

Open
#1,735 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
9.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Some themes, such as Glow, CapturedMotion, Sunrise, and Flow, may not accurately reflect Dark or Light mode because their internal logic is rigidly set.

To Reproduce

Go to Window Settings -> set the theme to Sunrise, then set the color to Dark.

Expected behavior

After delving into the logic of SystemThemeWatcher, I discovered that it uses SystemThemeManager.GetCachedSystemTheme() which only reflects the set theme type and doesn't accurately reflect Dark or Light color.

I want to create another solution to read into

Registry.GetValue(
    @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize",
    "AppsUseLightTheme",
    1
);
Screenshots
Image
OS version

Windows 11 Pro Insider Preview (25H2 Build 26300.8687)

.NET version

.NET 10

WPF-UI NuGet version

4.3.0

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating SystemThemeWatcher and tracing its use of SystemThemeManager.GetCachedSystemTheme(). Reproduce the Sunrise theme with Dark color in Windows Settings, then compare the watcher result with the AppsUseLightTheme value from the stated registry location. Done means the affected themes accurately reflect the selected Dark or Light mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.