Skip to content

Commit

Permalink
fix: fix editor progress position when enabled pinnedTabsOnSeparateRow
Browse files Browse the repository at this point in the history
  • Loading branch information
alijs committed Oct 11, 2023
1 parent 257d2bf commit 8f2c0e7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion build/lib/stylelint/vscode-known-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,7 @@
"--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 Expand Up @@ -780,4 +781,4 @@
"--z-index-notebook-sticky-scroll",
"--zoom-factor"
]
}
}
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: 33px; /* at the bottom of the 35px height title container */
top: var(--editor-group-tab-total-height);
z-index: 5; /* on top of things */
height: 2px;
}
Expand Down
3 changes: 2 additions & 1 deletion src/vs/workbench/browser/parts/editor/editorTabsControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,13 @@ 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 {

// Update tab height
if (oldOptions.tabHeight !== newOptions.tabHeight) {
if (oldOptions.tabHeight !== newOptions.tabHeight || oldOptions.pinnedTabsOnSeparateRow !== newOptions.pinnedTabsOnSeparateRow) {
this.updateTabHeight();
}
}
Expand Down

0 comments on commit 8f2c0e7

Please sign in to comment.