Added windows based dark mode detection via config override

This commit is contained in:
IceStormNG
2023-08-19 09:06:54 +02:00
parent 0ffb9f11d4
commit eaf2483558

View File

@@ -74,6 +74,11 @@ namespace GHelper.UI
return false; return false;
} }
if (uiMode is not null && uiMode.ToLower() == "windows")
{
return CheckSystemDarkModeStatus();
}
using var key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"); using var key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize");
var registryValueObject = key?.GetValue("AppsUseLightTheme"); var registryValueObject = key?.GetValue("AppsUseLightTheme");