mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-20 01:25:37 -05:00
fix dimensions of the query editor (#5910)
This commit is contained in:
committed by
Karl Burtram
parent
68328f65b5
commit
76a84a2cf4
@@ -3,27 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
.vs-dark .side-by-side-editor > .master-editor-container {
|
||||
box-shadow: -6px 0 5px -5px black;
|
||||
}
|
||||
|
||||
.side-by-side-editor > .master-editor-container {
|
||||
box-shadow: -6px 0 5px -5px #DDD;
|
||||
}
|
||||
|
||||
.vs-dark .side-by-side-editor > .master-editor-container-horizontal {
|
||||
box-shadow: 0 -6px 5px -5px black;
|
||||
}
|
||||
|
||||
.side-by-side-editor > .master-editor-container-horizontal {
|
||||
box-shadow: 0 -6px 5px -5px #DDD;
|
||||
}
|
||||
|
||||
.editDataEditor {
|
||||
height: inherit
|
||||
}
|
||||
|
||||
#chartViewerDiv .chartViewer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.query-editor-view {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -57,6 +57,7 @@ export class QueryEditor extends BaseEditor {
|
||||
private textFileEditorContainer: HTMLElement;
|
||||
|
||||
private taskbar: Taskbar;
|
||||
private splitviewContainer: HTMLElement;
|
||||
private splitview: SplitView;
|
||||
|
||||
private inputDisposables: IDisposable[] = [];
|
||||
@@ -100,13 +101,13 @@ export class QueryEditor extends BaseEditor {
|
||||
public createEditor(parent: HTMLElement): void {
|
||||
DOM.addClass(parent, 'query-editor');
|
||||
|
||||
let splitviewContainer = DOM.$('.query-editor-view');
|
||||
this.splitviewContainer = DOM.$('.query-editor-view');
|
||||
|
||||
this.createTaskbar(parent);
|
||||
|
||||
parent.appendChild(splitviewContainer);
|
||||
parent.appendChild(this.splitviewContainer);
|
||||
|
||||
this.splitview = this._register(new SplitView(splitviewContainer, { orientation: Orientation.VERTICAL }));
|
||||
this.splitview = this._register(new SplitView(this.splitviewContainer, { orientation: Orientation.VERTICAL }));
|
||||
this._register(this.splitview.onDidSashReset(() => this.splitview.distributeViewSizes()));
|
||||
|
||||
// We create two separate editors - one for Untitled Documents (ad-hoc queries) and another for queries from
|
||||
@@ -344,7 +345,9 @@ export class QueryEditor extends BaseEditor {
|
||||
*/
|
||||
public layout(dimension: DOM.Dimension): void {
|
||||
this.dimension = dimension;
|
||||
this.splitview.layout(dimension.height - 31);
|
||||
const queryEditorHeight = dimension.height - DOM.getTotalHeight(this.taskbar.getContainer());
|
||||
this.splitviewContainer.style.height = queryEditorHeight + 'px';
|
||||
this.splitview.layout(queryEditorHeight);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user