Skip to content

Commit

Permalink
Fixed: #5978 support theming-webview-content
Browse files Browse the repository at this point in the history
Signed-off-by: MiaoWoo <admin@yumc.pw>
  • Loading branch information
502647092 authored and akosyakov committed Aug 22, 2019
1 parent c1d367f commit 865e0f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/plugin-ext/src/main/browser/webviews-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ export class WebviewsMainImpl implements WebviewsMain {
}

this.themeRulesService.setRules(styleElement, this.themeRulesService.getCurrentThemeRules());
contentDocument.body.className = `vscode-${ThemeService.get().getCurrentTheme().id}`;
toDispose.push(this.themeService.onThemeChange(() => {
this.themeRulesService.setRules(<HTMLElement>styleElement, this.themeRulesService.getCurrentThemeRules());
contentDocument.body.className = `vscode-${ThemeService.get().getCurrentTheme().id}`;
}));
}
},
Expand Down

0 comments on commit 865e0f9

Please sign in to comment.