Skip to content

Commit

Permalink
Merge pull request #763 from davidegiacometti/fix-custom-app-theme
Browse files Browse the repository at this point in the history
Fix custom app theme detection
  • Loading branch information
pomianowski authored Sep 16, 2023
2 parents 15de62d + 9687251 commit 7c68ab7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Wpf.Ui/Appearance/SystemThemeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,16 @@ private static SystemTheme GetCurrentSystemTheme()
"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize",
"AppsUseLightTheme",
1
) ?? 1;
);

if (rawAppsUseLightTheme is 0)
{
return SystemTheme.Dark;
}
else if (rawAppsUseLightTheme is 1)
{
return SystemTheme.Light;
}

var rawSystemUsesLightTheme =
Registry.GetValue(
Expand Down

0 comments on commit 7c68ab7

Please sign in to comment.