Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 (#7880)

* Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998

* fix pipelines

* fix strict-null-checks

* add missing files
This commit is contained in:
Anthony Dresser
2019-10-21 22:12:22 -07:00
committed by GitHub
parent 7c9be74970
commit 1e22f47304
913 changed files with 18898 additions and 16536 deletions

View File

@@ -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;
}
}

View File

@@ -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);
}

View File

@@ -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);