diff --git a/app/UI/CustomControls.cs b/app/UI/CustomControls.cs index cb7cbdc6..a2ebf4b9 100644 --- a/app/UI/CustomControls.cs +++ b/app/UI/CustomControls.cs @@ -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");