@@ -111,9 +111,14 @@ export class ColorManager implements IColorManager {
|
|||||||
this._updateRestoreColors();
|
this._updateRestoreColors();
|
||||||
}
|
}
|
||||||
|
|
||||||
public onOptionsChange(key: string): void {
|
public onOptionsChange(key: string, value: any): void {
|
||||||
if (key === 'minimumContrastRatio') {
|
switch (key) {
|
||||||
this._contrastCache.clear();
|
case 'minimumContrastRatio':
|
||||||
|
this._contrastCache.clear();
|
||||||
|
break;
|
||||||
|
case 'allowTransparency':
|
||||||
|
this.allowTransparency = value;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -517,7 +517,7 @@ export class Terminal extends CoreTerminal implements ITerminal {
|
|||||||
|
|
||||||
this._theme = this.options.theme || this._theme;
|
this._theme = this.options.theme || this._theme;
|
||||||
this._colorManager = new ColorManager(document, this.options.allowTransparency);
|
this._colorManager = new ColorManager(document, this.options.allowTransparency);
|
||||||
this.register(this.optionsService.onOptionChange(e => this._colorManager!.onOptionsChange(e)));
|
this.register(this.optionsService.onOptionChange(e => this._colorManager!.onOptionsChange(e, this.optionsService.rawOptions[e])));
|
||||||
this._colorManager.setTheme(this._theme);
|
this._colorManager.setTheme(this._theme);
|
||||||
|
|
||||||
this._characterJoinerService = this._instantiationService.createInstance(CharacterJoinerService);
|
this._characterJoinerService = this._instantiationService.createInstance(CharacterJoinerService);
|
||||||
|
|||||||
Vendored
+1
-1
@@ -110,7 +110,7 @@ export interface IBrowser {
|
|||||||
|
|
||||||
export interface IColorManager {
|
export interface IColorManager {
|
||||||
colors: IColorSet;
|
colors: IColorSet;
|
||||||
onOptionsChange(key: string): void;
|
onOptionsChange(key: string, value: any): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IColorSet {
|
export interface IColorSet {
|
||||||
|
|||||||
Reference in New Issue
Block a user