Skip to content

Commit

Permalink
Fix dark/light theme detection
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunLawrie committed Apr 22, 2022
1 parent 76061e2 commit fb3527a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ static void Main()
private static bool CheckSystemLightMode()
{
string RegistryKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize";
var theme = Registry.GetValue(RegistryKey, "AppsUseLightTheme", string.Empty)?.ToString() ?? "1";
if (theme.Equals("1"))
var theme = Registry.GetValue(RegistryKey, "AppsUseLightTheme", "1");
if (theme is not null && theme.Equals("1"))
{
return true;
}
Expand Down
4 changes: 4 additions & 0 deletions SummaryForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fb3527a

Please sign in to comment.