mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-24 17:23:05 -05:00
Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 (#7880)
* Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 * fix pipelines * fix strict-null-checks * add missing files
This commit is contained in:
@@ -131,22 +131,22 @@ export class DropdownList extends Dropdown {
|
||||
}
|
||||
|
||||
protected applyStyles(): void {
|
||||
const background = this.backgroundColor ? this.backgroundColor.toString() : null;
|
||||
const foreground = this.foregroundColor ? this.foregroundColor.toString() : null;
|
||||
const border = this.borderColor ? this.borderColor.toString() : null;
|
||||
const background = this.backgroundColor ? this.backgroundColor.toString() : '';
|
||||
const foreground = this.foregroundColor ? this.foregroundColor.toString() : '';
|
||||
const border = this.borderColor ? this.borderColor.toString() : '';
|
||||
this.applyStylesOnElement(this._contentContainer, background, foreground, border);
|
||||
if (this.label) {
|
||||
this.applyStylesOnElement(this.element, background, foreground, border);
|
||||
}
|
||||
}
|
||||
|
||||
private applyStylesOnElement(element: HTMLElement, background: string | null, foreground: string | null, border: string | null): void {
|
||||
private applyStylesOnElement(element: HTMLElement, background: string, foreground: string, border: string): void {
|
||||
if (element) {
|
||||
element.style.backgroundColor = background;
|
||||
element.style.color = foreground;
|
||||
|
||||
element.style.borderWidth = border ? '1px' : null;
|
||||
element.style.borderStyle = border ? 'solid' : null;
|
||||
element.style.borderWidth = border ? '1px' : '';
|
||||
element.style.borderStyle = border ? 'solid' : '';
|
||||
element.style.borderColor = border;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ export class ListBox extends SelectBox {
|
||||
this.selectElement.style.border = `1px solid ${this.selectBorder}`;
|
||||
} else if (this.message) {
|
||||
const styles = this.stylesForType(this.message.type);
|
||||
this.selectElement.style.border = styles.border ? `1px solid ${styles.border}` : null;
|
||||
this.selectElement.style.border = styles.border ? `1px solid ${styles.border}` : '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,8 +224,8 @@ export class ListBox extends SelectBox {
|
||||
dom.addClass(spanElement, this.classForType(this.message.type));
|
||||
|
||||
const styles = this.stylesForType(this.message.type);
|
||||
spanElement.style.backgroundColor = styles.background ? styles.background.toString() : null;
|
||||
spanElement.style.border = styles.border ? `1px solid ${styles.border}` : null;
|
||||
spanElement.style.backgroundColor = styles.background ? styles.background.toString() : '';
|
||||
spanElement.style.border = styles.border ? `1px solid ${styles.border}` : '';
|
||||
|
||||
dom.append(div, spanElement);
|
||||
}
|
||||
|
||||
@@ -224,8 +224,8 @@ export class SelectBox extends vsSelectBox {
|
||||
dom.addClass(spanElement, this.classForType(message.type));
|
||||
|
||||
const styles = this.stylesForType(message.type);
|
||||
spanElement.style.backgroundColor = styles.background ? styles.background.toString() : null;
|
||||
spanElement.style.border = styles.border ? `1px solid ${styles.border}` : null;
|
||||
spanElement.style.backgroundColor = styles.background ? styles.background.toString() : '';
|
||||
spanElement.style.border = styles.border ? `1px solid ${styles.border}` : '';
|
||||
|
||||
dom.append(div, spanElement);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user