From 70a0161f108d4cfbbc9b8c6378bcf09a89d9cb81 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 5 Mar 2018 11:22:30 +0100 Subject: [PATCH] center layout: hide sahses initialy until center layout gets activated fixes #44866 --- .../workbench/browser/parts/editor/editorGroupsControl.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index d37e32d52c2..4168aec526b 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -1049,6 +1049,9 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro this.centeredEditorSashRight = new Sash(container.getHTMLElement(), this, { baseSize: 5, orientation: Orientation.VERTICAL }); registerSashListeners(this.centeredEditorSashLeft); registerSashListeners(this.centeredEditorSashRight); + this.centeredEditorSashLeft.hide(); + console.log('hiding'); + this.centeredEditorSashRight.hide(); this.centeredEditorActive = false; this.centeredEditorLeftMarginRatio = 0.5; @@ -2139,6 +2142,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro const id = this.visibleEditors[Position.ONE] ? this.visibleEditors[Position.ONE].getId() : undefined; const doCentering = this.layoutVertically && this.stacks.groups.length === 1 && this.partService.isEditorLayoutCentered() && id !== PREFERENCES_EDITOR_ID && id !== TEXT_DIFF_EDITOR_ID; if (doCentering && !this.centeredEditorActive) { + console.log('showing'); this.centeredEditorSashLeft.show(); this.centeredEditorSashRight.show(); @@ -2147,6 +2151,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro this.resetCenteredEditor(false); } } else if (!doCentering && this.centeredEditorActive) { + console.log('hiding'); this.centeredEditorSashLeft.hide(); this.centeredEditorSashRight.hide(); } @@ -2154,6 +2159,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro this.silos[Position.ONE].setClass('centered', doCentering); if (this.centeredEditorActive) { + console.log('layouting'); this.centeredEditorSashLeft.layout(); this.centeredEditorSashRight.layout(); } -- GitLab