mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Finalize StatusBarItem.tooltip: MarkdownString. Fixes #128127
This commit is contained in:
@@ -36,8 +36,7 @@ export class ExtHostStatusBarEntry implements vscode.StatusBarItem {
|
||||
private _visible: boolean = false;
|
||||
|
||||
private _text: string = '';
|
||||
private _tooltip?: string;
|
||||
private _tooltip2?: vscode.MarkdownString | string;
|
||||
private _tooltip?: string | vscode.MarkdownString;
|
||||
private _name?: string;
|
||||
private _color?: string | ThemeColor;
|
||||
private _backgroundColor?: ThemeColor;
|
||||
@@ -85,14 +84,6 @@ export class ExtHostStatusBarEntry implements vscode.StatusBarItem {
|
||||
return this._name;
|
||||
}
|
||||
|
||||
public get tooltip(): string | undefined {
|
||||
return this._tooltip;
|
||||
}
|
||||
|
||||
public get tooltip2(): string | vscode.MarkdownString | undefined {
|
||||
return this._tooltip2;
|
||||
}
|
||||
|
||||
public get color(): string | ThemeColor | undefined {
|
||||
return this._color;
|
||||
}
|
||||
@@ -124,11 +115,6 @@ export class ExtHostStatusBarEntry implements vscode.StatusBarItem {
|
||||
this.update();
|
||||
}
|
||||
|
||||
public set tooltip2(tooltip: vscode.MarkdownString | string | undefined) {
|
||||
this._tooltip2 = tooltip;
|
||||
this.update();
|
||||
}
|
||||
|
||||
public set color(color: string | ThemeColor | undefined) {
|
||||
this._color = color;
|
||||
this.update();
|
||||
@@ -220,7 +206,7 @@ export class ExtHostStatusBarEntry implements vscode.StatusBarItem {
|
||||
color = ExtHostStatusBarEntry.ALLOWED_BACKGROUND_COLORS.get(this._backgroundColor.id);
|
||||
}
|
||||
|
||||
const tooltip = this._tooltip2 !== undefined ? MarkdownString.fromStrict(this._tooltip2) : this.tooltip;
|
||||
const tooltip = this._tooltip ? MarkdownString.fromStrict(this._tooltip) : undefined;
|
||||
|
||||
// Set to status bar
|
||||
this.#proxy.$setEntry(this._entryId, id, name, this._text, tooltip, this._command?.internal, color,
|
||||
|
||||
Reference in New Issue
Block a user