Use theme service in more places

This commit is contained in:
Daniel Imms
2022-10-08 13:55:23 -07:00
parent 80e474c6ad
commit 6e35bcd767
18 changed files with 160 additions and 169 deletions
+1 -9
View File
@@ -91,7 +91,7 @@ export class RenderService extends Disposable implements IRenderService {
// matchMedia query.
this.register(addDisposableDomListener(coreBrowserService.window, 'resize', () => this.handleDevicePixelRatioChange()));
this.register(themeService.onChangeColors(e => this._handleChangeColors(e)));
this.register(themeService.onChangeColors(() => this._fullRefresh()));
// Detect whether IntersectionObserver is detected and enable renderer pause
// and resume based on terminal visibility if so
@@ -208,14 +208,6 @@ export class RenderService extends Disposable implements IRenderService {
this._fullRefresh();
}
private _handleChangeColors(colors: ReadonlyColorSet): void {
if (!this._renderer) {
return;
}
this._renderer.setColors(colors);
this._fullRefresh();
}
public handleDevicePixelRatioChange(): void {
// Force char size measurement as DomMeasureStrategy(getBoundingClientRect) is not stable
// when devicePixelRatio changes