From b51f344771f159ea5ffd7e37948aadbae9014d76 Mon Sep 17 00:00:00 2001 From: SteVen Batten Date: Wed, 12 Aug 2020 11:51:36 -0700 Subject: [PATCH] don't use tranlate3d in notebooks for custom menus Co-authored-by: SteVen Batten Co-authored-by: rebornix --- .../contrib/notebook/browser/notebookEditorWidget.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts b/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts index b8487f2b538..05575ea7039 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts @@ -55,6 +55,9 @@ import { IListContextMenuEvent } from 'vs/base/browser/ui/list/list'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IMenuService, MenuId } from 'vs/platform/actions/common/actions'; import { IAction, Separator } from 'vs/base/common/actions'; +import { isMacintosh, isNative } from 'vs/base/common/platform'; +import { getTitleBarStyle } from 'vs/platform/windows/common/windows'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; const $ = DOM.$; @@ -214,6 +217,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor @IStorageService storageService: IStorageService, @INotebookService private notebookService: INotebookService, @IConfigurationService private readonly configurationService: IConfigurationService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, @IContextKeyService readonly contextKeyService: IContextKeyService, @ILayoutService private readonly layoutService: ILayoutService, @IContextMenuService private readonly contextMenuService: IContextMenuService, @@ -401,7 +405,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor multipleSelectionSupport: false, enableKeyboardNavigation: true, additionalScrollHeight: 0, - transformOptimization: true, + transformOptimization: (isMacintosh && isNative) || getTitleBarStyle(this.configurationService, this.environmentService) === 'native', styleController: (_suffix: string) => { return this._list!; }, overrideStyles: { listBackground: editorBackground, -- GitLab