fix #117254
This commit is contained in:
parent
d2b24cd57b
commit
e4364e5f5d
4 changed files with 34 additions and 34 deletions
|
@ -11,7 +11,7 @@ export abstract class PreviewStatusBarEntry extends Disposable {
|
|||
|
||||
protected readonly entry: vscode.StatusBarItem;
|
||||
|
||||
constructor(options: vscode.window.StatusBarItemOptions) {
|
||||
constructor(options: vscode.StatusBarItemOptions) {
|
||||
super();
|
||||
this.entry = this._register(vscode.window.createStatusBarItem(options));
|
||||
}
|
||||
|
|
|
@ -1138,10 +1138,10 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
|||
}
|
||||
|
||||
getBounds(): Rectangle {
|
||||
const pos = this._win.getPosition();
|
||||
const dimension = this._win.getSize();
|
||||
const [x, y] = this._win.getPosition();
|
||||
const [width, height] = this._win.getSize();
|
||||
|
||||
return { x: pos[0], y: pos[1], width: dimension[0], height: dimension[1] };
|
||||
return { x, y, width, height };
|
||||
}
|
||||
|
||||
toggleFullScreen(): void {
|
||||
|
|
58
src/vs/vscode.proposed.d.ts
vendored
58
src/vs/vscode.proposed.d.ts
vendored
|
@ -986,43 +986,43 @@ declare module 'vscode' {
|
|||
|
||||
//#region Status bar item with ID and Name: https://github.com/microsoft/vscode/issues/74972
|
||||
|
||||
export namespace window {
|
||||
/**
|
||||
* Options to configure the status bar item.
|
||||
*/
|
||||
export interface StatusBarItemOptions {
|
||||
|
||||
/**
|
||||
* Options to configure the status bar item.
|
||||
* A unique identifier of the status bar item. The identifier
|
||||
* is for example used to allow a user to show or hide the
|
||||
* status bar item in the UI.
|
||||
*/
|
||||
export interface StatusBarItemOptions {
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* A unique identifier of the status bar item. The identifier
|
||||
* is for example used to allow a user to show or hide the
|
||||
* status bar item in the UI.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* A human readable name of the status bar item. The name is
|
||||
* for example used as a label in the UI to show or hide the
|
||||
* status bar item.
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* A human readable name of the status bar item. The name is
|
||||
* for example used as a label in the UI to show or hide the
|
||||
* status bar item.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Accessibility information used when screen reader interacts with this status bar item.
|
||||
*/
|
||||
accessibilityInformation?: AccessibilityInformation;
|
||||
|
||||
/**
|
||||
* Accessibility information used when screen reader interacts with this status bar item.
|
||||
*/
|
||||
accessibilityInformation?: AccessibilityInformation;
|
||||
/**
|
||||
* The alignment of the status bar item.
|
||||
*/
|
||||
alignment?: StatusBarAlignment;
|
||||
|
||||
/**
|
||||
* The alignment of the status bar item.
|
||||
*/
|
||||
alignment?: StatusBarAlignment;
|
||||
/**
|
||||
* The priority of the status bar item. Higher value means the item should
|
||||
* be shown more to the left.
|
||||
*/
|
||||
priority?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* The priority of the status bar item. Higher value means the item should
|
||||
* be shown more to the left.
|
||||
*/
|
||||
priority?: number;
|
||||
}
|
||||
export namespace window {
|
||||
|
||||
/**
|
||||
* Creates a status bar [item](#StatusBarItem).
|
||||
|
|
|
@ -577,7 +577,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
|||
showSaveDialog(options) {
|
||||
return extHostDialogs.showSaveDialog(options);
|
||||
},
|
||||
createStatusBarItem(alignmentOrOptions?: vscode.StatusBarAlignment | vscode.window.StatusBarItemOptions, priority?: number): vscode.StatusBarItem {
|
||||
createStatusBarItem(alignmentOrOptions?: vscode.StatusBarAlignment | vscode.StatusBarItemOptions, priority?: number): vscode.StatusBarItem {
|
||||
let id: string;
|
||||
let name: string;
|
||||
let alignment: number | undefined;
|
||||
|
|
Loading…
Reference in a new issue