mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-08 10:39:10 +01:00
On macOS sheets appear in the wrong location (fixes #21367)
This commit is contained in:
1 parent
d41c48d46d
commit
bd2ebc4f63
1 file changed
+11
-2
@@ -205,18 +205,27 @@ export class VSCodeWindow implements IVSCodeWindow {
|
||||
options.icon = path.join(this.environmentService.appRoot, 'resources/linux/code.png'); // Windows and Mac are better off using the embedded icon(s)
|
||||
}
|
||||
|
||||
let useCustomTitleStyle = false;
|
||||
if (platform.isMacintosh && (!this.options.titleBarStyle || this.options.titleBarStyle === 'custom')) {
|
||||
const isDev = !this.environmentService.isBuilt || !!config.extensionDevelopmentPath;
|
||||
if (!isDev) {
|
||||
options.titleBarStyle = 'hidden'; // not enabled when developing due to https://github.com/electron/electron/issues/3647
|
||||
this.hiddenTitleBarStyle = true;
|
||||
useCustomTitleStyle = true; // not enabled when developing due to https://github.com/electron/electron/issues/3647
|
||||
}
|
||||
}
|
||||
|
||||
if (useCustomTitleStyle) {
|
||||
options.titleBarStyle = 'hidden';
|
||||
this.hiddenTitleBarStyle = true;
|
||||
}
|
||||
|
||||
// Create the browser window.
|
||||
this._win = new BrowserWindow(options);
|
||||
this._id = this._win.id;
|
||||
|
||||
if (useCustomTitleStyle) {
|
||||
this._win.setSheetOffset(22); // offset dialogs by the height of the custom title bar if we have any
|
||||
}
|
||||
|
||||
if (isFullscreenOrMaximized) {
|
||||
this.win.maximize();
|
||||
|
||||
|
||||
Reference in new issue
Block a user