From dbb421f5033405236bb43a14fc2ac1dd87a36b43 Mon Sep 17 00:00:00 2001 From: Karl Burtram Date: Tue, 19 Dec 2017 00:33:42 -0800 Subject: [PATCH] Disable custom title bar rendering on macOS (#362) --- src/vs/code/electron-main/window.ts | 16 ++++++++++------ src/vs/workbench/electron-browser/workbench.ts | 3 +++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 4baa7528ed..1eb14933f7 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -169,12 +169,16 @@ export class CodeWindow implements ICodeWindow { } let useCustomTitleStyle = false; - if (isMacintosh && (!windowConfig || !windowConfig.titleBarStyle || windowConfig.titleBarStyle === 'custom')) { - const isDev = !this.environmentService.isBuilt || !!config.extensionDevelopmentPath; - if (!isDev) { - useCustomTitleStyle = true; // not enabled when developing due to https://github.com/electron/electron/issues/3647 - } - } + + // {{SQL CARBON EDIT}} + // turn-off custom menus to avoid bug calculating size of SQL editor + // + // if (isMacintosh && (!windowConfig || !windowConfig.titleBarStyle || windowConfig.titleBarStyle === 'custom')) { + // const isDev = !this.environmentService.isBuilt || !!config.extensionDevelopmentPath; + // if (!isDev) { + // useCustomTitleStyle = true; // not enabled when developing due to https://github.com/electron/electron/issues/3647 + // } + // } if (useNativeTabs) { useCustomTitleStyle = false; // native tabs on sierra do not work with custom title style diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index efc9235721..c48f290fd3 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -833,6 +833,8 @@ export class Workbench implements IPartService { } private getCustomTitleBarStyle(): 'custom' { + // {{SQL CARBON EDIT}} + /* if (!isMacintosh) { return null; // custom title bar is only supported on Mac currently } @@ -854,6 +856,7 @@ export class Workbench implements IPartService { return style; } } + */ return null; }