Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/editor/common/editorTheme.ts
3292 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { IColorTheme } from '../../platform/theme/common/themeService.js';
7
import { ColorIdentifier } from '../../platform/theme/common/colorRegistry.js';
8
import { Color } from '../../base/common/color.js';
9
import { ColorScheme } from '../../platform/theme/common/theme.js';
10
11
export class EditorTheme {
12
13
private _theme: IColorTheme;
14
15
public get type(): ColorScheme {
16
return this._theme.type;
17
}
18
19
public get value(): IColorTheme {
20
return this._theme;
21
}
22
23
constructor(theme: IColorTheme) {
24
this._theme = theme;
25
}
26
27
public update(theme: IColorTheme): void {
28
this._theme = theme;
29
}
30
31
public getColor(color: ColorIdentifier): Color | undefined {
32
return this._theme.getColor(color);
33
}
34
}
35
36