Skip to content

Commit

Permalink
Merge pull request #45118 from JoeRobich/dont-default-colors
Browse files Browse the repository at this point in the history
Don't default classifications if colors have been customized
  • Loading branch information
JoeRobich authored Jun 13, 2020
2 parents e7663ec + d83908d commit 18b41d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,14 @@ private bool IsForegroundTheSchemeColor(Guid themeId, ImmutableDictionary<string
/// <summary>
/// Reverts Classifications to their default state.
/// </summary>
public void DefaultClassifications()
public void DefaultClassifications(bool isThemeCustomized)
{
AssertIsForeground();

var themeId = _settings.GetThemeId();

// Make no changes when in high contast mode, in unknown theme, or if theme has been defaulted.
if (SystemParameters.HighContrast || !IsSupportedTheme(themeId) || _settings.HasThemeBeenDefaulted[themeId])
// Make no changes when in high contast mode, in unknown theme, in customized theme, or if theme has been defaulted.
if (SystemParameters.HighContrast || !IsSupportedTheme(themeId) || isThemeCustomized || _settings.HasThemeBeenDefaulted[themeId])
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private void UpdateColorScheme(bool themeChanged = false)
if (themeChanged)
{
// Default Foreground colors if they match our theme colors.
_colorDefaulter.DefaultClassifications();
_colorDefaulter.DefaultClassifications(IsThemeCustomized());
}

// If the color scheme has updated, apply the scheme.
Expand Down

0 comments on commit 18b41d0

Please sign in to comment.