diff --git a/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs b/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs index 263e8b56..a7006a7d 100644 --- a/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs +++ b/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs @@ -1714,8 +1714,11 @@ namespace v2rayN.ViewModels public void ModifyTheme(out bool isDarkTheme) { - var currentTheme = SystemParameters.HighContrast ? Theme.Dark : Theme.Light; - isDarkTheme = currentTheme == Theme.Dark; + var currentTheme = Application.Current.Resources.MergedDictionaries + .OfType() + .FirstOrDefault()? + .BaseColorScheme == ThemeManager.BaseColorScheme.Dark; + isDarkTheme = currentTheme.HasValue && currentTheme.Value; var window = Application.Current.MainWindow; var windowChrome = WindowChrome.GetWindowChrome(window);