Skip to content

Commit 007c46d

Browse files
authored
Merge pull request #43200 from dotnet/dev/jorobich/apply-colors-on-initialize
Update color scheme on package initialization.
2 parents 4e5a229 + fa1771f commit 007c46d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,14 @@ public void Initialize()
8080

8181
VSColorTheme.ThemeChanged += VSColorTheme_ThemeChanged;
8282

83-
QueueColorSchemeUpdate(themeChanged: true);
83+
// Since the Roslyn colors are now defined in the Roslyn repo and no longer applied by the VS pkgdef built from EditorColors.xml,
84+
// We attempt to apply a color scheme when the Roslyn package is loaded. This is our chance to update the configuration registry
85+
// with the Roslyn colors before they are seen by the user. This is important because the MEF exported Roslyn classification
86+
// colors are only applicable to the Blue and Light VS themes.
87+
88+
// When we update the colors we also flag that this is potentially a theme change, as settings could have synced over from a
89+
// different VS instance and we may need to perform additional work to default colors that match our scheme.
90+
UpdateColorScheme(themeChanged: true);
8491
}
8592
}
8693

0 commit comments

Comments
 (0)