Skip to content

Commit b0285f9

Browse files
committed
layout: simpler math
1 parent e80ca48 commit b0285f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/browser/layout.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal
187187
private set sidebarWidth(value: number) {
188188
const editorCountForWidth = this.editorGroupService.getGroupOrientation() === 'vertical' ? this.editorGroupService.getStacksModel().groups.length : 1;
189189
const panelMinWidth = this.partService.getPanelPosition() === Position.RIGHT && this.partService.isVisible(Parts.PANEL_PART) ? MIN_PANEL_PART_WIDTH : 0;
190-
const maxSidebarWidth = Math.max(this.partLayoutInfo.sidebar.minWidth, this.workbenchSize.width - this.activitybarWidth - editorCountForWidth * MIN_EDITOR_PART_WIDTH - panelMinWidth);
191-
this._sidebarWidth = Math.min(maxSidebarWidth, Math.max(this.partLayoutInfo.sidebar.minWidth, value));
190+
const maxSidebarWidth = this.workbenchSize.width - this.activitybarWidth - editorCountForWidth * MIN_EDITOR_PART_WIDTH - panelMinWidth;
191+
this._sidebarWidth = Math.max(this.partLayoutInfo.sidebar.minWidth, Math.min(maxSidebarWidth, value));
192192
}
193193

194194
private getPartLayoutInfo(): PartLayoutInfo {

0 commit comments

Comments
 (0)