mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-31 20:46:24 +01:00
less flicker when opening first editor
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user