mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 01:00:29 -04:00
Merge from vscode 6268feb42ba4f2e2fa15484e88c9af60d254998c (#6530)
This commit is contained in:
@@ -135,6 +135,7 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
|
||||
private tocFocusedElement: SettingsTreeGroupElement | null;
|
||||
private settingsTreeScrollTop = 0;
|
||||
private dimension: DOM.Dimension;
|
||||
|
||||
constructor(
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@@ -287,10 +288,11 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
}
|
||||
|
||||
layout(dimension: DOM.Dimension): void {
|
||||
this.dimension = dimension;
|
||||
this.layoutTrees(dimension);
|
||||
|
||||
const innerWidth = dimension.width - 24 * 2; // 24px padding on left and right
|
||||
const monacoWidth = (innerWidth > 1000 ? 1000 : innerWidth) - 10;
|
||||
const innerWidth = Math.min(1000, dimension.width) - 24 * 2; // 24px padding on left and right;
|
||||
const monacoWidth = innerWidth - 10 - this.countElement.clientWidth - 12; // minus padding inside inputbox, countElement width, extra padding before countElement
|
||||
this.searchWidget.layout({ height: 20, width: monacoWidth });
|
||||
|
||||
DOM.toggleClass(this.rootElement, 'mid-width', dimension.width < 1000 && dimension.width >= 600);
|
||||
@@ -1239,7 +1241,11 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
: 'none';
|
||||
|
||||
if (!this.searchResultModel) {
|
||||
this.countElement.style.display = 'none';
|
||||
if (this.countElement.style.display !== 'none') {
|
||||
this.countElement.style.display = 'none';
|
||||
this.layout(this.dimension);
|
||||
}
|
||||
|
||||
DOM.removeClass(this.rootElement, 'no-results');
|
||||
return;
|
||||
}
|
||||
@@ -1252,7 +1258,10 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
default: this.countElement.innerText = localize('moreThanOneResult', "{0} Settings Found", count);
|
||||
}
|
||||
|
||||
this.countElement.style.display = 'block';
|
||||
if (this.countElement.style.display !== 'block') {
|
||||
this.countElement.style.display = 'block';
|
||||
this.layout(this.dimension);
|
||||
}
|
||||
DOM.toggleClass(this.rootElement, 'no-results', count === 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user