diff --git a/src/vs/workbench/browser/parts/editor/media/tabstitle.css b/src/vs/workbench/browser/parts/editor/media/tabstitle.css index f924bd490e513c9c2c3c718029bd22c76450b8b3..3baf5fb5cfc3e0549d2e7dd0088a3ecb3d1823f6 100644 --- a/src/vs/workbench/browser/parts/editor/media/tabstitle.css +++ b/src/vs/workbench/browser/parts/editor/media/tabstitle.css @@ -5,15 +5,15 @@ /* Title Container */ -.vs .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title.tabs { +.vs .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title.tabs.shows-tabs { background: #F3F3F3; } -.vs-dark .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title.tabs { +.vs-dark .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title.tabs.shows-tabs { background: #252526; } -.hc-black .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title.tabs { +.hc-black .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title.tabs.shows-tabs { border-bottom: 1px solid #6FC3DF; } diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index d9b5013616696a476dc66e694df8eb38d86b1291..e1f6ef8a1b26d94552f75ad9a2f75793f9dbe243 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -320,6 +320,7 @@ export class TabsTitleControl extends TitleControl { this.tabDisposeables = dispose(this.tabDisposeables); this.editorLabels = dispose(this.editorLabels); + DOM.removeClass(this.titleContainer, 'shows-tabs'); } private refreshTabs(group: IEditorGroup): void { @@ -330,7 +331,8 @@ export class TabsTitleControl extends TitleControl { const tabContainers: HTMLElement[] = []; // Add a tab for each opened editor - this.context.getEditors().forEach(editor => { + const editors = this.context.getEditors(); + editors.forEach(editor => { // Tab Container const tabContainer = document.createElement('div'); @@ -366,6 +368,10 @@ export class TabsTitleControl extends TitleControl { // Add to tabs container tabContainers.forEach(tab => this.tabsContainer.appendChild(tab)); + + if (editors.length > 0) { + DOM.addClass(this.titleContainer, 'shows-tabs'); + } } public layout(): void {