Skip to content

Commit 8458f87

Browse files
authored
Custom Titlebar Menu Fix (microsoft#203300)
custom titlebar menu fix
1 parent afd4f63 commit 8458f87

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/vs/workbench/browser/parts/titlebar/titlebarActions.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,24 @@ class ToggleCustomTitleBar extends Action2 {
106106
title: localize('toggle.customTitleBar', 'Custom Title Bar'),
107107
toggled: TitleBarVisibleContext,
108108
menu: [
109-
{ id: MenuId.MenubarAppearanceMenu, order: 6, when: ContextKeyExpr.or(ContextKeyExpr.equals(TitleBarStyleContext.key, TitlebarStyle.NATIVE), IsMainWindowFullscreenContext), group: '2_workbench_layout' },
110-
]
109+
{
110+
id: MenuId.MenubarAppearanceMenu,
111+
order: 6,
112+
when: ContextKeyExpr.or(
113+
ContextKeyExpr.and(
114+
ContextKeyExpr.equals(TitleBarStyleContext.key, TitlebarStyle.NATIVE),
115+
ContextKeyExpr.and(
116+
ContextKeyExpr.equals('config.workbench.layoutControl.enabled', false),
117+
ContextKeyExpr.equals('config.window.commandCenter', false),
118+
ContextKeyExpr.notEquals('config.workbench.editor.editorActionsLocation', 'titleBar'),
119+
ContextKeyExpr.notEquals('config.workbench.activityBar.location', 'top')
120+
)?.negate()
121+
),
122+
IsMainWindowFullscreenContext
123+
),
124+
group: '2_workbench_layout'
125+
},
126+
],
111127
});
112128
}
113129

0 commit comments

Comments
 (0)