Skip to content

Commit

Permalink
Print win10 theme info when verboseLogging switched on
Browse files Browse the repository at this point in the history
  • Loading branch information
celeron533 committed Jul 11, 2019
1 parent 6c71121 commit 72678c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions shadowsocks-csharp/Util/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static string GetTempPath()
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
Expand All @@ -78,8 +78,11 @@ public static WindowsThemeMode GetWindows10SystemThemeSetting()
}
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;
}
Expand Down
2 changes: 1 addition & 1 deletion shadowsocks-csharp/View/MenuViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ private Color SelectColorMask(bool isProxyEnabled, bool isGlobalProxy)
{
Color colorMask = Color.White;

Utils.WindowsThemeMode currentWindowsThemeMode = Utils.GetWindows10SystemThemeSetting();
Utils.WindowsThemeMode currentWindowsThemeMode = Utils.GetWindows10SystemThemeSetting(controller.GetCurrentConfiguration().isVerboseLogging);

if (isProxyEnabled)
{
Expand Down

0 comments on commit 72678c4

Please sign in to comment.