Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Feb 23, 2021
1 parent d2b24cd commit e4364e5
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion extensions/image-preview/src/ownedStatusBarEntry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
6 changes: 3 additions & 3 deletions src/vs/platform/windows/electron-main/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
58 changes: 29 additions & 29 deletions src/vs/vscode.proposed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/api/common/extHost.api.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e4364e5

Please sign in to comment.