Skip to content

Commit 50bbabb

Browse files
author
Benjamin Pasero
committed
web - configure menu settings
1 parent 6520c22 commit 50bbabb

4 files changed

Lines changed: 29 additions & 83 deletions

File tree

src/vs/workbench/browser/main.contribution.ts

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/vs/workbench/browser/workbench.contribution.ts

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { Registry } from 'vs/platform/registry/common/platform';
77
import * as nls from 'vs/nls';
88
import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry';
9-
import { isMacintosh } from 'vs/base/common/platform';
9+
import { isMacintosh, isWindows, isLinux, isWeb } from 'vs/base/common/platform';
1010

1111
// Configuration
1212
(function registerConfiguration(): void {
@@ -278,6 +278,34 @@ import { isMacintosh } from 'vs/base/common/platform';
278278
'type': 'string',
279279
'default': isMacintosh ? '${activeEditorShort}${separator}${rootName}' : '${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}',
280280
'markdownDescription': windowTitleDescription
281+
},
282+
'window.menuBarVisibility': {
283+
'type': 'string',
284+
'enum': ['default', 'visible', 'toggle', 'hidden'],
285+
'enumDescriptions': [
286+
nls.localize('window.menuBarVisibility.default', "Menu is only hidden in full screen mode."),
287+
nls.localize('window.menuBarVisibility.visible', "Menu is always visible even in full screen mode."),
288+
nls.localize('window.menuBarVisibility.toggle', "Menu is hidden but can be displayed via Alt key."),
289+
nls.localize('window.menuBarVisibility.hidden', "Menu is always hidden.")
290+
],
291+
'default': 'default',
292+
'scope': ConfigurationScope.APPLICATION,
293+
'description': nls.localize('menuBarVisibility', "Control the visibility of the menu bar. A setting of 'toggle' means that the menu bar is hidden and a single press of the Alt key will show it. By default, the menu bar will be visible, unless the window is full screen."),
294+
'included': isWindows || isLinux || isWeb
295+
},
296+
'window.enableMenuBarMnemonics': {
297+
'type': 'boolean',
298+
'default': true,
299+
'scope': ConfigurationScope.APPLICATION,
300+
'description': nls.localize('enableMenuBarMnemonics', "If enabled, the main menus can be opened via Alt-key shortcuts. Disabling mnemonics allows to bind these Alt-key shortcuts to editor commands instead."),
301+
'included': isWindows || isLinux || isWeb
302+
},
303+
'window.disableCustomMenuBarAltFocus': {
304+
'type': 'boolean',
305+
'default': false,
306+
'scope': ConfigurationScope.APPLICATION,
307+
'markdownDescription': nls.localize('disableCustomMenuBarAltFocus', "If enabled, disables the ability to focus the menu bar with the Alt-key when not set to toggle."),
308+
'included': isWindows || isLinux || isWeb
281309
}
282310
}
283311
});

src/vs/workbench/electron-browser/main.contribution.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -591,34 +591,6 @@ import product from 'vs/platform/product/node/product';
591591
'default': false,
592592
'description': nls.localize('closeWhenEmpty', "Controls whether closing the last editor should also close the window. This setting only applies for windows that do not show folders.")
593593
},
594-
'window.menuBarVisibility': {
595-
'type': 'string',
596-
'enum': ['default', 'visible', 'toggle', 'hidden'],
597-
'enumDescriptions': [
598-
nls.localize('window.menuBarVisibility.default', "Menu is only hidden in full screen mode."),
599-
nls.localize('window.menuBarVisibility.visible', "Menu is always visible even in full screen mode."),
600-
nls.localize('window.menuBarVisibility.toggle', "Menu is hidden but can be displayed via Alt key."),
601-
nls.localize('window.menuBarVisibility.hidden', "Menu is always hidden.")
602-
],
603-
'default': 'default',
604-
'scope': ConfigurationScope.APPLICATION,
605-
'description': nls.localize('menuBarVisibility', "Control the visibility of the menu bar. A setting of 'toggle' means that the menu bar is hidden and a single press of the Alt key will show it. By default, the menu bar will be visible, unless the window is full screen."),
606-
'included': isWindows || isLinux
607-
},
608-
'window.enableMenuBarMnemonics': {
609-
'type': 'boolean',
610-
'default': true,
611-
'scope': ConfigurationScope.APPLICATION,
612-
'description': nls.localize('enableMenuBarMnemonics', "If enabled, the main menus can be opened via Alt-key shortcuts. Disabling mnemonics allows to bind these Alt-key shortcuts to editor commands instead."),
613-
'included': isWindows || isLinux
614-
},
615-
'window.disableCustomMenuBarAltFocus': {
616-
'type': 'boolean',
617-
'default': false,
618-
'scope': ConfigurationScope.APPLICATION,
619-
'markdownDescription': nls.localize('disableCustomMenuBarAltFocus', "If enabled, disables the ability to focus the menu bar with the Alt-key when not set to toggle."),
620-
'included': isWindows || isLinux
621-
},
622594
'window.autoDetectHighContrast': {
623595
'type': 'boolean',
624596
'default': true,

src/vs/workbench/workbench.web.main.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import 'vs/editor/editor.all';
99

1010
import 'vs/workbench/api/browser/extensionHost.contribution';
1111

12-
import 'vs/workbench/browser/main.contribution';
1312
import 'vs/workbench/browser/workbench.contribution';
1413

1514
import 'vs/workbench/browser/web.main';

0 commit comments

Comments
 (0)