mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
custom menu - enable by default again on Windows
This commit is contained in:
@@ -560,7 +560,15 @@ export class CodeApplication {
|
||||
// Install Menu
|
||||
const instantiationService = accessor.get(IInstantiationService);
|
||||
const configurationService = accessor.get(IConfigurationService);
|
||||
if (platform.isMacintosh || configurationService.getValue<string>('window.titleBarStyle') !== 'custom') {
|
||||
|
||||
let createNativeMenu = true;
|
||||
if (platform.isLinux) {
|
||||
createNativeMenu = configurationService.getValue<string>('window.titleBarStyle') !== 'custom';
|
||||
} else if (platform.isWindows) {
|
||||
createNativeMenu = configurationService.getValue<string>('window.titleBarStyle') === 'native';
|
||||
}
|
||||
|
||||
if (createNativeMenu) {
|
||||
instantiationService.createInstance(CodeMenu);
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,11 @@ export class CodeWindow implements ICodeWindow {
|
||||
useCustomTitleStyle = false; // not enabled when developing due to https://github.com/electron/electron/issues/3647
|
||||
}
|
||||
} else {
|
||||
useCustomTitleStyle = windowConfig && windowConfig.titleBarStyle === 'custom'; // Must be specified on Windows/Linux
|
||||
if (isLinux) {
|
||||
useCustomTitleStyle = windowConfig && windowConfig.titleBarStyle === 'custom';
|
||||
} else {
|
||||
useCustomTitleStyle = !windowConfig || !windowConfig.titleBarStyle || windowConfig.titleBarStyle === 'custom'; // Default to custom on Windows
|
||||
}
|
||||
}
|
||||
|
||||
if (useNativeTabs) {
|
||||
|
||||
@@ -794,7 +794,7 @@ configurationRegistry.registerConfiguration({
|
||||
'window.titleBarStyle': {
|
||||
'type': 'string',
|
||||
'enum': ['native', 'custom'],
|
||||
'default': isMacintosh ? 'custom' : 'native',
|
||||
'default': isLinux ? 'native' : 'custom',
|
||||
'scope': ConfigurationScope.APPLICATION,
|
||||
'description': nls.localize('titleBarStyle', "Adjust the appearance of the window title bar. Changes require a full restart to apply.")
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user