Custom Titlebar Menu Fix (#203300)

custom titlebar menu fix
This commit is contained in:
Benjamin Simmonds 2024-01-24 11:03:54 +01:00 committed by GitHub
parent afd4f631aa
commit 8458f875df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -106,8 +106,24 @@ class ToggleCustomTitleBar extends Action2 {
title: localize('toggle.customTitleBar', 'Custom Title Bar'),
toggled: TitleBarVisibleContext,
menu: [
{ id: MenuId.MenubarAppearanceMenu, order: 6, when: ContextKeyExpr.or(ContextKeyExpr.equals(TitleBarStyleContext.key, TitlebarStyle.NATIVE), IsMainWindowFullscreenContext), group: '2_workbench_layout' },
]
{
id: MenuId.MenubarAppearanceMenu,
order: 6,
when: ContextKeyExpr.or(
ContextKeyExpr.and(
ContextKeyExpr.equals(TitleBarStyleContext.key, TitlebarStyle.NATIVE),
ContextKeyExpr.and(
ContextKeyExpr.equals('config.workbench.layoutControl.enabled', false),
ContextKeyExpr.equals('config.window.commandCenter', false),
ContextKeyExpr.notEquals('config.workbench.editor.editorActionsLocation', 'titleBar'),
ContextKeyExpr.notEquals('config.workbench.activityBar.location', 'top')
)?.negate()
),
IsMainWindowFullscreenContext
),
group: '2_workbench_layout'
},
],
});
}