Merge pull request #1125 from IceStormNG/main

Dark/Light Mode override
This commit is contained in:
Serge
2023-08-18 18:48:44 +02:00
committed by GitHub

View File

@@ -62,6 +62,18 @@ namespace GHelper.UI
private static bool IsDarkTheme()
{
string? uiMode = AppConfig.GetString("ui_mode");
if (uiMode is not null && uiMode.ToLower() == "dark")
{
return true;
}
if (uiMode is not null && uiMode.ToLower() == "light")
{
return false;
}
using var key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize");
var registryValueObject = key?.GetValue("AppsUseLightTheme");