mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
allow centered layout in horizontal mode
This commit is contained in:
parent
4059210607
commit
17793908fd
|
@ -1927,7 +1927,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
|
|||
}
|
||||
|
||||
private get centeredEditorAvailableSize(): number {
|
||||
return this.silosSize[Position.ONE] - EditorGroupsControl.CENTERED_EDITOR_MIN_MARGIN * 2;
|
||||
return this.dimension.width - EditorGroupsControl.CENTERED_EDITOR_MIN_MARGIN * 2;
|
||||
}
|
||||
|
||||
private get centeredEditorSize(): number {
|
||||
|
@ -2139,7 +2139,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
|
|||
|
||||
// Layout centered Editor (only in vertical layout when one group is opened)
|
||||
const id = this.visibleEditors[Position.ONE] ? this.visibleEditors[Position.ONE].getId() : undefined;
|
||||
const doCentering = this.layoutVertically && this.partService.isEditorLayoutCentered() && this.stacks.groups.length === 1 && id !== PREFERENCES_EDITOR_ID && id !== TEXT_DIFF_EDITOR_ID;
|
||||
const doCentering = this.partService.isEditorLayoutCentered() && this.stacks.groups.length === 1 && id !== PREFERENCES_EDITOR_ID && id !== TEXT_DIFF_EDITOR_ID;
|
||||
if (doCentering && !this.centeredEditorActive) {
|
||||
this.centeredEditorSashLeft.show();
|
||||
this.centeredEditorSashRight.show();
|
||||
|
|
Loading…
Reference in a new issue