提交 39d599cd 编写于 作者: R Ristomatti Airo

Support menu bar visibility toggle also on Linux (fixes #1563)

上级 607af813
......@@ -33,7 +33,7 @@ workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(Reload
workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(CloseMessagesAction, CloseMessagesAction.ID, CloseMessagesAction.LABEL, { primary: KeyCode.Escape }, [{ key: WorkbenchMessageService.GLOBAL_MESSAGES_SHOWING_CONTEXT }]));
workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorAction, CloseEditorAction.ID, CloseEditorAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_W, win: { primary: KeyMod.CtrlCmd | KeyCode.F4, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_W] } }), viewCategory);
workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleFullScreenAction, ToggleFullScreenAction.ID, ToggleFullScreenAction.LABEL, { primary: KeyCode.F11, mac: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_F } }), viewCategory);
if (platform.isWindows) {
if (platform.isWindows || platform.isLinux) {
workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleMenuBarAction, ToggleMenuBarAction.ID, ToggleMenuBarAction.LABEL), viewCategory);
}
......
......@@ -541,7 +541,7 @@ export class VSCodeMenu {
output,
__separator__(),
fullscreen,
platform.isWindows ? toggleMenuBar : void 0,
platform.isWindows || platform.isLinux ? toggleMenuBar : void 0,
__separator__(),
splitEditor,
toggleSidebar,
......
......@@ -549,8 +549,8 @@ export class VSCodeWindow {
this.win.setFullScreen(willBeFullScreen);
// Windows: Hide the menu bar but still allow to bring it up by pressing the Alt key
if (platform.isWindows) {
// Windows & Linux: Hide the menu bar but still allow to bring it up by pressing the Alt key
if (platform.isWindows || platform.isLinux) {
if (willBeFullScreen) {
this.setMenuBarVisibility(false);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册