Skip to content

Commit b51f344

Browse files
sbattenrebornix
andcommitted
don't use tranlate3d in notebooks for custom menus
Co-authored-by: SteVen Batten <sbatten@microsoft.com> Co-authored-by: rebornix <penlv@microsoft.com>
1 parent 3e9c6ea commit b51f344

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ import { IListContextMenuEvent } from 'vs/base/browser/ui/list/list';
5555
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
5656
import { IMenuService, MenuId } from 'vs/platform/actions/common/actions';
5757
import { IAction, Separator } from 'vs/base/common/actions';
58+
import { isMacintosh, isNative } from 'vs/base/common/platform';
59+
import { getTitleBarStyle } from 'vs/platform/windows/common/windows';
60+
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
5861

5962
const $ = DOM.$;
6063

@@ -214,6 +217,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
214217
@IStorageService storageService: IStorageService,
215218
@INotebookService private notebookService: INotebookService,
216219
@IConfigurationService private readonly configurationService: IConfigurationService,
220+
@IEnvironmentService private readonly environmentService: IEnvironmentService,
217221
@IContextKeyService readonly contextKeyService: IContextKeyService,
218222
@ILayoutService private readonly layoutService: ILayoutService,
219223
@IContextMenuService private readonly contextMenuService: IContextMenuService,
@@ -401,7 +405,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
401405
multipleSelectionSupport: false,
402406
enableKeyboardNavigation: true,
403407
additionalScrollHeight: 0,
404-
transformOptimization: true,
408+
transformOptimization: (isMacintosh && isNative) || getTitleBarStyle(this.configurationService, this.environmentService) === 'native',
405409
styleController: (_suffix: string) => { return this._list!; },
406410
overrideStyles: {
407411
listBackground: editorBackground,

0 commit comments

Comments
 (0)