Skip to content

Commit 075f330

Browse files
authored
Merge pull request #4475 from kelvinhammond/patch-1
Re-render browser DOM style onOptionsChanged, fixes #4474
2 parents 913cb25 + 854e273 commit 075f330

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/browser/renderer/dom/DomRenderer.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class DomRenderer extends Disposable implements IRenderer {
5353
@IOptionsService private readonly _optionsService: IOptionsService,
5454
@IBufferService private readonly _bufferService: IBufferService,
5555
@ICoreBrowserService private readonly _coreBrowserService: ICoreBrowserService,
56-
@IThemeService themeService: IThemeService
56+
@IThemeService private readonly _themeService: IThemeService
5757
) {
5858
super();
5959
this._rowContainer = document.createElement('div');
@@ -69,8 +69,8 @@ export class DomRenderer extends Disposable implements IRenderer {
6969
this._updateDimensions();
7070
this.register(this._optionsService.onOptionChange(() => this._handleOptionsChanged()));
7171

72-
this.register(themeService.onChangeColors(e => this._injectCss(e)));
73-
this._injectCss(themeService.colors);
72+
this.register(this._themeService.onChangeColors(e => this._injectCss(e)));
73+
this._injectCss(this._themeService.colors);
7474

7575
this._rowFactory = instantiationService.createInstance(DomRendererRowFactory, document);
7676

@@ -340,6 +340,8 @@ export class DomRenderer extends Disposable implements IRenderer {
340340
private _handleOptionsChanged(): void {
341341
// Force a refresh
342342
this._updateDimensions();
343+
// Refresh CSS
344+
this._injectCss(this._themeService.colors);
343345
}
344346

345347
public clear(): void {

0 commit comments

Comments
 (0)