mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-04 09:35:38 -05:00
Merge from vscode 9bc92b48d945144abb405b9e8df05e18accb9148
This commit is contained in:
@@ -124,6 +124,13 @@ export interface IGlobalEditorOptions {
|
||||
* Defaults to 20000.
|
||||
*/
|
||||
maxTokenizationLineLength?: number;
|
||||
/**
|
||||
* Theme to be used for rendering.
|
||||
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
|
||||
* You can create custom themes via `monaco.editor.defineTheme`.
|
||||
* To switch a theme, use `monaco.editor.setTheme`
|
||||
*/
|
||||
theme?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -334,6 +341,7 @@ export class StandaloneEditor extends StandaloneCodeEditor implements IStandalon
|
||||
|
||||
private readonly _contextViewService: ContextViewService;
|
||||
private readonly _configurationService: IConfigurationService;
|
||||
private readonly _standaloneThemeService: IStandaloneThemeService;
|
||||
private _ownsModel: boolean;
|
||||
|
||||
constructor(
|
||||
@@ -363,6 +371,7 @@ export class StandaloneEditor extends StandaloneCodeEditor implements IStandalon
|
||||
|
||||
this._contextViewService = <ContextViewService>contextViewService;
|
||||
this._configurationService = configurationService;
|
||||
this._standaloneThemeService = themeService;
|
||||
this._register(toDispose);
|
||||
this._register(themeDomRegistration);
|
||||
|
||||
@@ -391,6 +400,9 @@ export class StandaloneEditor extends StandaloneCodeEditor implements IStandalon
|
||||
|
||||
public updateOptions(newOptions: IEditorOptions & IGlobalEditorOptions): void {
|
||||
applyConfigurationValues(this._configurationService, newOptions, false);
|
||||
if (typeof newOptions.theme === 'string') {
|
||||
this._standaloneThemeService.setTheme(newOptions.theme);
|
||||
}
|
||||
super.updateOptions(newOptions);
|
||||
}
|
||||
|
||||
@@ -414,6 +426,7 @@ export class StandaloneDiffEditor extends DiffEditorWidget implements IStandalon
|
||||
|
||||
private readonly _contextViewService: ContextViewService;
|
||||
private readonly _configurationService: IConfigurationService;
|
||||
private readonly _standaloneThemeService: IStandaloneThemeService;
|
||||
|
||||
constructor(
|
||||
domElement: HTMLElement,
|
||||
@@ -443,6 +456,7 @@ export class StandaloneDiffEditor extends DiffEditorWidget implements IStandalon
|
||||
|
||||
this._contextViewService = <ContextViewService>contextViewService;
|
||||
this._configurationService = configurationService;
|
||||
this._standaloneThemeService = themeService;
|
||||
|
||||
this._register(toDispose);
|
||||
this._register(themeDomRegistration);
|
||||
@@ -454,8 +468,11 @@ export class StandaloneDiffEditor extends DiffEditorWidget implements IStandalon
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
public updateOptions(newOptions: IDiffEditorOptions): void {
|
||||
public updateOptions(newOptions: IDiffEditorOptions & IGlobalEditorOptions): void {
|
||||
applyConfigurationValues(this._configurationService, newOptions, true);
|
||||
if (typeof newOptions.theme === 'string') {
|
||||
this._standaloneThemeService.setTheme(newOptions.theme);
|
||||
}
|
||||
super.updateOptions(newOptions);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user