Browse Source

Print win10 theme info when verboseLogging switched on

tags/4.1.7.1
celeron533 5 years ago
parent
commit
72678c462d
2 changed files with 7 additions and 4 deletions
  1. +6
    -3
      shadowsocks-csharp/Util/Util.cs
  2. +1
    -1
      shadowsocks-csharp/View/MenuViewController.cs

+ 6
- 3
shadowsocks-csharp/Util/Util.cs View File

@@ -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;
}


+ 1
- 1
shadowsocks-csharp/View/MenuViewController.cs View File

@@ -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)
{


Loading…
Cancel
Save