diff --git a/src/vs/workbench/browser/parts/editor/editor.ts b/src/vs/workbench/browser/parts/editor/editor.ts index 1fefdd61b31..f1b252778bf 100644 --- a/src/vs/workbench/browser/parts/editor/editor.ts +++ b/src/vs/workbench/browser/parts/editor/editor.ts @@ -49,7 +49,7 @@ export const DEFAULT_EDITOR_PART_OPTIONS: IEditorPartOptions = { splitOnDragAndDrop: true, centeredLayoutFixedWidth: false, doubleClickTabToToggleEditorGroupSizes: 'expand', - showEditorActionsInTitleBar: true, + showEditorActionsInTitleBar: 'noTabs', }; export function impactsEditorPartOptions(event: IConfigurationChangeEvent): boolean { diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts index e2ed62c5bd9..187ab74fb92 100644 --- a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts +++ b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts @@ -574,7 +574,7 @@ export class TitlebarPart extends Part implements ITitleService { } private get editorActionsEnabled(): boolean { - return !!this.editorGroupService.partOptions.showEditorActionsInTitleBar && this.editorGroupService.partOptions.showTabs === 'none'; + return this.editorGroupService.partOptions.showEditorActionsInTitleBar !== 'never' && this.editorGroupService.partOptions.showTabs === 'none'; } private get activityActionsEnabled(): boolean { diff --git a/src/vs/workbench/browser/workbench.contribution.ts b/src/vs/workbench/browser/workbench.contribution.ts index 3e90066ce50..b65a42ef2fa 100644 --- a/src/vs/workbench/browser/workbench.contribution.ts +++ b/src/vs/workbench/browser/workbench.contribution.ts @@ -50,9 +50,14 @@ const registry = Registry.as(ConfigurationExtensions.Con 'default': 'multiple' }, 'workbench.editor.showEditorActionsInTitleBar': { - 'type': 'boolean', - 'markdownDescription': localize('showEditorActionsInTitleBar', "Controls whether editor actions are shown in the title bar. This value only applies when `#window.titleBarStyle#` is set to `custom` and `#workbench.editor.showTabs#` is set to `none`."), - 'default': true + 'type': 'string', + 'enum': ['noTabs', 'never'], + 'enumDescriptions': [ + localize('workbench.editor.showEditorActionsInTitleBar.noTabs', "Show editor actions in the editor title bar only when `#workbench.editor.showTabs#` is set to `none`. Otherwise, editor actions show up in the tab bar."), + localize('workbench.editor.showEditorActionsInTitleBar.never', "Do not show editor actions in the editor title bar"), + ], + 'markdownDescription': localize('showEditorActionsInTitleBar', "Controls whether editor actions are shown in the title bar. This value only applies when `#window.titleBarStyle#` is set to `custom`."), + 'default': 'noTabs' }, 'workbench.editor.wrapTabs': { 'type': 'boolean', diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index d2e238b1009..16ce2350f15 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -1141,7 +1141,7 @@ interface IEditorPartConfiguration { splitOnDragAndDrop?: boolean; centeredLayoutFixedWidth?: boolean; doubleClickTabToToggleEditorGroupSizes?: 'maximize' | 'expand' | 'off'; - showEditorActionsInTitleBar?: boolean; + showEditorActionsInTitleBar?: 'noTabs' | 'never'; limit?: IEditorPartLimitConfiguration; decorations?: IEditorPartDecorationsConfiguration; }