Skip to content

Commit

Permalink
layout: keep size before maximized in storage to be preserved across …
Browse files Browse the repository at this point in the history
…sessions

fixes #37375
  • Loading branch information
isidorn committed Nov 14, 2017
1 parent b70f2d4 commit cfb8344
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vs/workbench/browser/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal
private static sashXOneWidthSettingsKey = 'workbench.sidebar.width';
private static sashXTwoWidthSettingsKey = 'workbench.panel.width';
private static sashYHeightSettingsKey = 'workbench.panel.height';
private static panelSizeBeforeMaximizedKey = 'workbench.panel.sizeBeforeMaximized';

private parent: Builder;
private workbenchContainer: Builder;
Expand Down Expand Up @@ -108,7 +109,7 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal
this.statusbar = parts.statusbar;
this.quickopen = quickopen;
this.toUnbind = [];
this.panelSizeBeforeMaximized = 0;
this.panelSizeBeforeMaximized = this.storageService.getInteger(WorkbenchLayout.panelSizeBeforeMaximizedKey, StorageScope.GLOBAL, 0);
this.panelMaximized = false;

this.sashXOne = new Sash(this.workbenchContainer.getHTMLElement(), this, {
Expand Down Expand Up @@ -501,6 +502,7 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal
this.panelSizeBeforeMaximized = panelWidth;
}
}
this.storageService.store(WorkbenchLayout.panelSizeBeforeMaximizedKey, this.panelSizeBeforeMaximized, StorageScope.GLOBAL);
const panelDimension = new Dimension(panelWidth, panelHeight);

// Editor
Expand Down

0 comments on commit cfb8344

Please sign in to comment.