Skip to content

Commit

Permalink
Fixed theming issue
Browse files Browse the repository at this point in the history
[release]
  • Loading branch information
madskristensen committed Mar 30, 2022
1 parent 6eae62a commit 6156997
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Margin/Browser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6156997

Please sign in to comment.