diff --git a/src/sql/parts/query/editor/gridPanel.ts b/src/sql/parts/query/editor/gridPanel.ts index eb60d32a9e..964e1dc093 100644 --- a/src/sql/parts/query/editor/gridPanel.ts +++ b/src/sql/parts/query/editor/gridPanel.ts @@ -397,13 +397,15 @@ class GridTable extends Disposable implements IView { private scrolled = false; private visible = false; + private rowHeight: number; + public get resultSet(): azdata.ResultSetSummary { return this._resultSet; } // this handles if the row count is small, like 4-5 rows private get maxSize(): number { - return ((this.resultSet.rowCount) * ROW_HEIGHT) + HEADER_HEIGHT + ESTIMATED_SCROLL_BAR_HEIGHT; + return ((this.resultSet.rowCount) * this.rowHeight) + HEADER_HEIGHT + ESTIMATED_SCROLL_BAR_HEIGHT; } constructor( @@ -417,6 +419,8 @@ class GridTable extends Disposable implements IView { @IConfigurationService private configurationService: IConfigurationService ) { super(); + let config = this.configurationService.getValue<{ rowHeight: number }>('resultsGrid'); + this.rowHeight = config && config.rowHeight ? config.rowHeight : ROW_HEIGHT; this.state = state; this.container.style.width = '100%'; this.container.style.height = '100%'; @@ -490,7 +494,7 @@ class GridTable extends Disposable implements IView { }); this.columns.unshift(this.rowNumberColumn.getColumnDefinition()); let tableOptions: Slick.GridOptions = { - rowHeight: ROW_HEIGHT, + rowHeight: this.rowHeight, showRowNumber: true, forceFitColumns: false, defaultColumnWidth: 120 diff --git a/src/sql/parts/query/editor/queryResultsEditor.ts b/src/sql/parts/query/editor/queryResultsEditor.ts index e7bab0f9a9..e0a667a24d 100644 --- a/src/sql/parts/query/editor/queryResultsEditor.ts +++ b/src/sql/parts/query/editor/queryResultsEditor.ts @@ -126,7 +126,7 @@ export class QueryResultsEditor extends BaseEditor { cssRuleText = this._rawOptions.cellPadding.join('px ') + 'px;'; } let content = `.grid-panel .monaco-table .slick-cell { padding: ${cssRuleText} }`; - content += `.grid-panel .monaco-table { ${getBareResultsGridInfoStyles(this._rawOptions)} }`; + content += `.grid-panel .monaco-table, .message-tree { ${getBareResultsGridInfoStyles(this._rawOptions)} }`; this.styleSheet.innerHTML = content; }