diff --git a/extensions/image-preview/src/ownedStatusBarEntry.ts b/extensions/image-preview/src/ownedStatusBarEntry.ts index 7be0ec30f71..51c9e25503c 100644 --- a/extensions/image-preview/src/ownedStatusBarEntry.ts +++ b/extensions/image-preview/src/ownedStatusBarEntry.ts @@ -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)); } diff --git a/src/vs/platform/windows/electron-main/window.ts b/src/vs/platform/windows/electron-main/window.ts index e65c33c6216..943028dff4a 100644 --- a/src/vs/platform/windows/electron-main/window.ts +++ b/src/vs/platform/windows/electron-main/window.ts @@ -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 { diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 2552d5904cf..3f3d581afc7 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -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). diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 2a9ee2731de..012836283dc 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -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;