Skip to content

Commit 423ea3a

Browse files
authored
fix: register default color theme before render (#237)
1 parent f885ffa commit 423ea3a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/theme/src/browser/theme.contribution.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import {
2424
import { Autowired } from '@opensumi/di';
2525
import { MenuContribution, IMenuRegistry, MenuId } from '@opensumi/ide-core-browser/lib/menu/next';
2626
import { ISemanticTokenRegistry, ProbeScope } from '../common/semantic-tokens-registry';
27-
import { COLOR_THEME_SETTING } from './workbench.theme.service';
2827

2928
export const THEME_TOGGLE_COMMAND: Command = {
3029
id: 'theme.toggle',
@@ -56,11 +55,16 @@ export class ThemeContribution implements MenuContribution, CommandContribution,
5655
protected readonly semanticTokenRegistry: ISemanticTokenRegistry;
5756

5857
initialize() {
58+
this.registerDefaultColorTheme();
5959
this.registerDefaultTokenStyles();
6060
this.registerDefaultTokenType();
6161
this.registerDefaultTokenModifier();
6262
}
6363

64+
private registerDefaultColorTheme() {
65+
this.themeService.applyTheme(DEFAULT_THEME_ID);
66+
}
67+
6468
private registerDefaultTokenModifier() {
6569
this.semanticTokenRegistry.registerTokenModifier(
6670
'declaration',

0 commit comments

Comments
 (0)