diff --git a/src/Margin/Browser.cs b/src/Margin/Browser.cs index dfd2792..fa00d62 100644 --- a/src/Margin/Browser.cs +++ b/src/Margin/Browser.cs @@ -308,13 +308,10 @@ private string GetHtmlTemplate() if (AdvancedOptions.Instance.Theme == Theme.Automatic) { - SolidColorBrush brush = (SolidColorBrush)Application.Current.Resources[VsBrushes.ToolWindowBackgroundKey]; + SolidColorBrush brush = (SolidColorBrush)Application.Current.Resources[CommonControlsColors.TextBoxBackgroundBrushKey]; ContrastComparisonResult contrast = ColorUtilities.CompareContrastWithBlackAndWhite(brush.Color); - if (contrast == ContrastComparisonResult.ContrastHigherWithWhite) - { - useLightTheme = false; - } + useLightTheme = contrast == ContrastComparisonResult.ContrastHigherWithBlack; } if (!useLightTheme)