web: API to prevent initial theme flickering (also fixes #101226)

This commit is contained in:
Martin Aeschlimann
2020-08-24 16:13:40 +02:00
parent f3ac25fdd0
commit 8c5bdcdfb4
7 changed files with 40 additions and 34 deletions

View File

@@ -79,7 +79,6 @@ bootstrapWindow.load([
* @param {{
* partsSplashPath?: string,
* highContrast?: boolean,
* defaultThemeType?: string,
* extensionDevelopmentPath?: string[],
* folderUri?: object,
* workspace?: object
@@ -113,14 +112,10 @@ function showPartsSplash(configuration) {
baseTheme = data.baseTheme;
shellBackground = data.colorInfo.editorBackground;
shellForeground = data.colorInfo.foreground;
} else if (configuration.highContrast || configuration.defaultThemeType === 'hc') {
} else if (configuration.highContrast) {
baseTheme = 'hc-black';
shellBackground = '#000000';
shellForeground = '#FFFFFF';
} else if (configuration.defaultThemeType === 'vs') {
baseTheme = 'vs';
shellBackground = '#FFFFFF';
shellForeground = '#000000';
} else {
baseTheme = 'vs-dark';
shellBackground = '#1E1E1E';