mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
Add a new option to control whether to render inline color box or not.
This commit is contained in:
@@ -474,6 +474,7 @@ export interface IRawColorInfo {
|
||||
color: [number, number, number, number];
|
||||
availableFormats: (number | [number, number])[];
|
||||
range: IRange;
|
||||
renderDecorator: boolean;
|
||||
}
|
||||
|
||||
export type IRawColorFormatMap = [number, string][];
|
||||
|
||||
@@ -734,7 +734,8 @@ class ColorProviderAdapter {
|
||||
return {
|
||||
color: [ci.color.red, ci.color.green, ci.color.blue, ci.color.alpha] as [number, number, number, number],
|
||||
availableFormats: availableFormats,
|
||||
range: TypeConverters.fromRange(ci.range)
|
||||
range: TypeConverters.fromRange(ci.range),
|
||||
renderDecorator: ci.renderDecorator
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -1056,7 +1056,9 @@ export class ColorRange {
|
||||
|
||||
availableFormats: IColorFormat[];
|
||||
|
||||
constructor(range: Range, color: Color, availableFormats: IColorFormat[]) {
|
||||
renderDecorator: boolean;
|
||||
|
||||
constructor(range: Range, color: Color, availableFormats: IColorFormat[], renderDecorator: boolean) {
|
||||
if (color && !(color instanceof Color)) {
|
||||
throw illegalArgument('color');
|
||||
}
|
||||
@@ -1069,6 +1071,7 @@ export class ColorRange {
|
||||
this.range = range;
|
||||
this.color = color;
|
||||
this.availableFormats = availableFormats;
|
||||
this.renderDecorator = renderDecorator;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user