Skip to content

Commit fb06298

Browse files
committed
centered layout: unset margin-left, width, border-color when not centered
1 parent cb2181c commit fb06298

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/vs/workbench/browser/parts/editor/editorGroupsControl.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,8 +2211,10 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
22112211
}
22122212
}
22132213

2214-
editor.getContainer().style({ 'margin-left': `${editorPosition}px`, 'width': `${editorWidth}px` });
2215-
editor.getContainer().style('border-color', this.getColor(EDITOR_GROUP_BORDER) || this.getColor(contrastBorder));
2214+
const editorContainer = editor.getContainer();
2215+
editorContainer.style('margin-left', this.centeredEditorActive ? `${editorPosition}px` : null);
2216+
editorContainer.style('width', this.centeredEditorActive ? `${editorWidth}px` : null);
2217+
editorContainer.style('border-color', this.centeredEditorActive ? this.getColor(EDITOR_GROUP_BORDER) || this.getColor(contrastBorder) : null);
22162218
editor.layout(new Dimension(editorWidth, editorHeight));
22172219
}
22182220
}

0 commit comments

Comments
 (0)