提交 07be58da 编写于 作者: I Isidor Nikolic 提交者: GitHub

Merge pull request #18820 from charlespierce/preserve_maximize_on_zoom

#18467 Preserve panel maximization on zoom
......@@ -321,6 +321,7 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal
this.statusbarHeight = isStatusbarHidden ? 0 : this.partLayoutInfo.statusbar.height;
this.titlebarHeight = isTitlebarHidden ? 0 : this.partLayoutInfo.titlebar.height / getZoomFactor(); // adjust for zoom prevention
const previousMaxPanelHeight = this.sidebarHeight - MIN_EDITOR_PART_HEIGHT;
this.sidebarHeight = this.workbenchSize.height - this.statusbarHeight - this.titlebarHeight;
let sidebarSize = new Dimension(sidebarWidth, this.sidebarHeight);
......@@ -333,6 +334,8 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal
const maxPanelHeight = sidebarSize.height - MIN_EDITOR_PART_HEIGHT;
if (isPanelHidden) {
panelHeight = 0;
} else if (this.panelHeight === previousMaxPanelHeight) {
panelHeight = maxPanelHeight;
} else if (this.panelHeight > 0) {
panelHeight = Math.min(maxPanelHeight, Math.max(this.partLayoutInfo.panel.minHeight, this.panelHeight));
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册