Provide a default result grid height (#5710)

This commit is contained in:
Karl Burtram
2019-05-29 17:38:47 -07:00
committed by GitHub
parent 75ce8d6c20
commit 0893ba33fc

View File

@@ -366,13 +366,14 @@ export class QueryEditor extends BaseEditor {
private addResultsEditor() { private addResultsEditor() {
if (!this.resultsVisible) { if (!this.resultsVisible) {
let initialViewSize = Math.round(Math.max(this.dimension.height * 0.7, this.dimension.height - 150));
this.splitview.addView({ this.splitview.addView({
element: this.resultsEditorContainer, element: this.resultsEditorContainer,
layout: size => this.resultsEditor && this.resultsEditor.layout(new DOM.Dimension(this.dimension.width, size)), layout: size => this.resultsEditor && this.resultsEditor.layout(new DOM.Dimension(this.dimension.width, size)),
minimumSize: 0, minimumSize: 0,
maximumSize: Number.POSITIVE_INFINITY, maximumSize: Number.POSITIVE_INFINITY,
onDidChange: Event.None onDidChange: Event.None
}, Sizing.Distribute); }, initialViewSize);
this.resultsVisible = true; this.resultsVisible = true;
} }
} }