mirror of
https://github.com/2dust/v2rayN.git
synced 2025-08-29 14:26:20 +00:00
Simplify and improve Darkmode
This commit is contained in:
parent
f6e82bb81b
commit
c1c4d8752c
1 changed files with 5 additions and 2 deletions
|
@ -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<Theme>()
|
||||
.FirstOrDefault()?
|
||||
.BaseColorScheme == ThemeManager.BaseColorScheme.Dark;
|
||||
isDarkTheme = currentTheme.HasValue && currentTheme.Value;
|
||||
|
||||
var window = Application.Current.MainWindow;
|
||||
var windowChrome = WindowChrome.GetWindowChrome(window);
|
||||
|
|
Loading…
Reference in a new issue