diff --git a/shadowsocks-csharp/Util/Util.cs b/shadowsocks-csharp/Util/Util.cs index 47b1a0b7..56f1e0b1 100755 --- a/shadowsocks-csharp/Util/Util.cs +++ b/shadowsocks-csharp/Util/Util.cs @@ -58,7 +58,7 @@ namespace Shadowsocks.Util public enum WindowsThemeMode { Dark, Light } // Support on Windows 10 1903+ - public static WindowsThemeMode GetWindows10SystemThemeSetting() + public static WindowsThemeMode GetWindows10SystemThemeSetting(bool isVerbose) { WindowsThemeMode themeMode = WindowsThemeMode.Dark; try @@ -78,8 +78,11 @@ namespace Shadowsocks.Util } catch { - Logging.Info( - $"Cannot get Windows 10 system theme mode, return default value 0 (dark mode)."); + if (isVerbose) + { + Logging.Info( + $"Cannot get Windows 10 system theme mode, return default value 0 (dark mode)."); + } } return themeMode; } diff --git a/shadowsocks-csharp/View/MenuViewController.cs b/shadowsocks-csharp/View/MenuViewController.cs index a1d2ef4f..5c64a558 100644 --- a/shadowsocks-csharp/View/MenuViewController.cs +++ b/shadowsocks-csharp/View/MenuViewController.cs @@ -220,7 +220,7 @@ namespace Shadowsocks.View { Color colorMask = Color.White; - Utils.WindowsThemeMode currentWindowsThemeMode = Utils.GetWindows10SystemThemeSetting(); + Utils.WindowsThemeMode currentWindowsThemeMode = Utils.GetWindows10SystemThemeSetting(controller.GetCurrentConfiguration().isVerboseLogging); if (isProxyEnabled) {