Change ScreenDprMonitor to be event based

This commit is contained in:
Daniel Imms
2023-10-17 08:49:28 -07:00
parent 45605db3c5
commit 63790f8854
5 changed files with 32 additions and 30 deletions
@@ -112,7 +112,7 @@ export class OverviewRulerRenderer extends Disposable {
// overview ruler width changed
this.register(this._optionsService.onSpecificOptionChange('overviewRulerWidth', () => this._queueRefresh(true)));
// device pixel ratio changed
// TODO: Observe DPR instead
// TODO: Observe DPR instead / listen to window change
this.register(addDisposableDomListener(this._coreBrowserService.window, 'resize', () => this._queueRefresh(true)));
// set the canvas dimensions
this._queueRefresh(true);