mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 19:18:59 +01:00
Allow extensions to use theme colors in status bar
This commit is contained in:
@@ -277,7 +277,7 @@ export abstract class MainThreadQuickOpenShape {
|
||||
}
|
||||
|
||||
export abstract class MainThreadStatusBarShape {
|
||||
$setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string, alignment: MainThreadStatusBarAlignment, priority: number): void { throw ni(); }
|
||||
$setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string | editorCommon.ThemeColor, alignment: MainThreadStatusBarAlignment, priority: number): void { throw ni(); }
|
||||
$dispose(id: number) { throw ni(); }
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
|
||||
import { StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/statusbar/common/statusbar';
|
||||
import { StatusBarAlignment as ExtHostStatusBarAlignment, Disposable } from './extHostTypes';
|
||||
import { StatusBarAlignment as ExtHostStatusBarAlignment, Disposable, ThemeColor } from './extHostTypes';
|
||||
import { StatusBarItem, StatusBarAlignment } from 'vscode';
|
||||
import { MainContext, MainThreadStatusBarShape } from './extHost.protocol';
|
||||
|
||||
@@ -21,7 +21,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem {
|
||||
|
||||
private _text: string;
|
||||
private _tooltip: string;
|
||||
private _color: string;
|
||||
private _color: string | ThemeColor;
|
||||
private _command: string;
|
||||
|
||||
private _timeoutHandle: number;
|
||||
@@ -57,7 +57,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem {
|
||||
return this._tooltip;
|
||||
}
|
||||
|
||||
public get color(): string {
|
||||
public get color(): string | ThemeColor {
|
||||
return this._color;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem {
|
||||
this.update();
|
||||
}
|
||||
|
||||
public set color(color: string) {
|
||||
public set color(color: string | ThemeColor) {
|
||||
this._color = color;
|
||||
this.update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user