mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-11 13:51:25 -05:00
Windows: still allow to bring up the menu when in full screen
This commit is contained in:
1
src/typings/atom-browser.d.ts
vendored
1
src/typings/atom-browser.d.ts
vendored
@@ -190,6 +190,7 @@ declare class BrowserWindow extends EventEmitter {
|
||||
getPosition(): number[];
|
||||
setPosition(x: number, y: number): void;
|
||||
setMenuBarVisibility(visible: boolean): void;
|
||||
setAutoHideMenuBar(autoHide: boolean): void;
|
||||
maximize(): void;
|
||||
setRepresentedFilename(path: string): void;
|
||||
setTitle(title: string): void;
|
||||
|
||||
1
src/typings/atom-renderer.d.ts
vendored
1
src/typings/atom-renderer.d.ts
vendored
@@ -219,6 +219,7 @@ declare module 'remote' {
|
||||
getPosition(): number[];
|
||||
setPosition(x: number, y: number): void;
|
||||
setMenuBarVisibility(visible: boolean): void;
|
||||
setAutoHideMenuBar(autoHide: boolean): void;
|
||||
maximize(): void;
|
||||
setRepresentedFilename(path: string): void;
|
||||
setDocumentEdited(edited: boolean): void;
|
||||
|
||||
@@ -526,10 +526,15 @@ export class VSCodeWindow {
|
||||
}
|
||||
|
||||
public toggleFullScreen(): void {
|
||||
let isFullScreen = this.win.isFullScreen();
|
||||
let willBeFullScreen = !this.win.isFullScreen();
|
||||
|
||||
this.win.setFullScreen(!isFullScreen);
|
||||
this.win.setMenuBarVisibility(isFullScreen);
|
||||
this.win.setFullScreen(willBeFullScreen);
|
||||
|
||||
// Windows: Hide the menu bar but still allow to bring it up by pressing the Alt key
|
||||
if (platform.isWindows) {
|
||||
this.win.setMenuBarVisibility(!willBeFullScreen);
|
||||
this.win.setAutoHideMenuBar(willBeFullScreen);
|
||||
}
|
||||
}
|
||||
|
||||
public sendWhenReady(channel: string, ...args: any[]): void {
|
||||
|
||||
Reference in New Issue
Block a user