Skip to content

Commit

Permalink
fix: fix editor progress position
Browse files Browse the repository at this point in the history
  • Loading branch information
alijs committed Oct 16, 2023
1 parent 8f2c0e7 commit cea64be
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
1 change: 0 additions & 1 deletion build/lib/stylelint/vscode-known-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,6 @@
"--tab-sizing-fixed-min-width",
"--tab-sizing-fixed-max-width",
"--editor-group-tab-height",
"--editor-group-tab-total-height",
"--testMessageDecorationFontFamily",
"--testMessageDecorationFontSize",
"--title-border-bottom-color",
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/browser/media/part.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
.monaco-workbench .part.editor > .content .monaco-progress-container {
position: absolute;
left: 0;
top: var(--editor-group-tab-total-height);
bottom: 0;
z-index: 5; /* on top of things */
height: 2px;
}
Expand Down
18 changes: 9 additions & 9 deletions src/vs/workbench/browser/parts/editor/editorGroupView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,16 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
// Watermark & shortcuts
this._register(this.instantiationService.createInstance(EditorGroupWatermark, this.element));

// Context keys
this.handleGroupContextKeys();

// Title container
this.titleContainer = document.createElement('div');
this.titleContainer.classList.add('title');
this.element.appendChild(this.titleContainer);

// Progress bar
this.progressBar = this._register(new ProgressBar(this.element, defaultProgressBarStyles));
this.progressBar = this._register(new ProgressBar(this.titleContainer, defaultProgressBarStyles));
this.progressBar.hide();

// Scoped instantiation service
Expand All @@ -191,14 +199,6 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
[IEditorProgressService, this._register(new EditorProgressIndicator(this.progressBar, this))]
));

// Context keys
this.handleGroupContextKeys();

// Title container
this.titleContainer = document.createElement('div');
this.titleContainer.classList.add('title');
this.element.appendChild(this.titleContainer);

// Title control
this.titleControl = this._register(this.scopedInstantiationService.createInstance(EditorTitleControl, this.titleContainer, this.editorPartsView, this.groupsView, this, this.model));

Expand Down
1 change: 0 additions & 1 deletion src/vs/workbench/browser/parts/editor/editorTabsControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ export abstract class EditorTabsControl extends Themable implements IEditorTabsC

protected updateTabHeight(): void {
this.parent.style.setProperty('--editor-group-tab-height', `${this.tabHeight}px`);
this.parent.parentElement?.style.setProperty('--editor-group-tab-total-height', `${this.tabHeight * (this.groupsView.partOptions.pinnedTabsOnSeparateRow ? 2 : 1)}px`);
}

updateOptions(oldOptions: IEditorPartOptions, newOptions: IEditorPartOptions): void {
Expand Down

0 comments on commit cea64be

Please sign in to comment.