提交 8b1920e8 编写于 作者: B Benjamin Pasero

less flicker when opening first editor

上级 fc54fd5c
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
/* Title Container */ /* 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; 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; 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; border-bottom: 1px solid #6FC3DF;
} }
......
...@@ -320,6 +320,7 @@ export class TabsTitleControl extends TitleControl { ...@@ -320,6 +320,7 @@ export class TabsTitleControl extends TitleControl {
this.tabDisposeables = dispose(this.tabDisposeables); this.tabDisposeables = dispose(this.tabDisposeables);
this.editorLabels = dispose(this.editorLabels); this.editorLabels = dispose(this.editorLabels);
DOM.removeClass(this.titleContainer, 'shows-tabs');
} }
private refreshTabs(group: IEditorGroup): void { private refreshTabs(group: IEditorGroup): void {
...@@ -330,7 +331,8 @@ export class TabsTitleControl extends TitleControl { ...@@ -330,7 +331,8 @@ export class TabsTitleControl extends TitleControl {
const tabContainers: HTMLElement[] = []; const tabContainers: HTMLElement[] = [];
// Add a tab for each opened editor // Add a tab for each opened editor
this.context.getEditors().forEach(editor => { const editors = this.context.getEditors();
editors.forEach(editor => {
// Tab Container // Tab Container
const tabContainer = document.createElement('div'); const tabContainer = document.createElement('div');
...@@ -366,6 +368,10 @@ export class TabsTitleControl extends TitleControl { ...@@ -366,6 +368,10 @@ export class TabsTitleControl extends TitleControl {
// Add to tabs container // Add to tabs container
tabContainers.forEach(tab => this.tabsContainer.appendChild(tab)); tabContainers.forEach(tab => this.tabsContainer.appendChild(tab));
if (editors.length > 0) {
DOM.addClass(this.titleContainer, 'shows-tabs');
}
} }
public layout(): void { public layout(): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册