提交 ebb72846 编写于 作者: J Johannes Rieken

calls - fix split view issues

上级 4ac45c1b
......@@ -218,7 +218,7 @@ export abstract class PeekViewWidget extends ZoneWidget {
}
const headHeight = Math.ceil(this.editor.getOption(EditorOption.lineHeight) * 1.2);
const bodyHeight = heightInPixel - (headHeight + 2 /* the border-top/bottom width*/);
const bodyHeight = Math.round(heightInPixel - (headHeight + 2 /* the border-top/bottom width*/));
this._doLayoutHead(headHeight, widthInPixel);
this._doLayoutBody(bodyHeight, widthInPixel);
......
......@@ -220,7 +220,9 @@ export class CallHierarchyTreePeekWidget extends PeekViewWidget {
minimumSize: 200,
maximumSize: Number.MAX_VALUE,
layout: (width) => {
this._editor.layout({ height: this._dim.height, width });
if (this._dim.height) {
this._editor.layout({ height: this._dim.height, width });
}
}
}, Sizing.Distribute);
......@@ -230,7 +232,9 @@ export class CallHierarchyTreePeekWidget extends PeekViewWidget {
minimumSize: 100,
maximumSize: Number.MAX_VALUE,
layout: (width) => {
this._tree.layout(this._dim.height, width);
if (this._dim.height) {
this._tree.layout(this._dim.height, width);
}
}
}, Sizing.Distribute);
......@@ -424,11 +428,13 @@ export class CallHierarchyTreePeekWidget extends PeekViewWidget {
}
protected _doLayoutBody(height: number, width: number): void {
super._doLayoutBody(height, width);
this._dim = { height, width };
this._layoutInfo.height = this._viewZone ? this._viewZone.heightInLines : this._layoutInfo.height;
this._splitView.layout(width);
this._splitView.resizeView(0, width * this._layoutInfo.ratio);
if (this._dim.height !== height || this._dim.width === width) {
super._doLayoutBody(height, width);
this._dim = { height, width };
this._layoutInfo.height = this._viewZone ? this._viewZone.heightInLines : this._layoutInfo.height;
this._splitView.layout(width);
this._splitView.resizeView(0, width * this._layoutInfo.ratio);
}
}
}
......
......@@ -10,6 +10,7 @@
.monaco-workbench .call-hierarchy[data-state="data"] .results {
display: inherit;
height: 100%;
}
.monaco-workbench .call-hierarchy[data-state="message"] .message {
......@@ -33,11 +34,7 @@
background-position: left center;
}
.monaco-workbench .call-hierarchy .monaco-split-view2.horizontal > .split-view-container > .split-view-view {
/* this is a little bizare.. */
height: unset;
}
.monaco-workbench .call-hierarchy .editor,
.monaco-workbench .call-hierarchy .tree {
height: 100%;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册