mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-01 01:25:38 -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);
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ export class Dropdown extends Disposable {
|
||||
}
|
||||
|
||||
private _showList(): void {
|
||||
if (this._input.isEnabled) {
|
||||
if (this._input.isEnabled()) {
|
||||
this._onFocus.fire();
|
||||
this._filter.filterString = '';
|
||||
this.contextViewService.showContextView({
|
||||
@@ -297,7 +297,7 @@ export class Dropdown extends Disposable {
|
||||
style(style: IListStyles & IInputBoxStyles & IDropdownStyles) {
|
||||
this._tree.style(style);
|
||||
this._input.style(style);
|
||||
this._treeContainer.style.backgroundColor = style.contextBackground ? style.contextBackground.toString() : null;
|
||||
this._treeContainer.style.backgroundColor = style.contextBackground ? style.contextBackground.toString() : '';
|
||||
this._treeContainer.style.outline = `1px solid ${style.contextBorder || this._options.contextBorder}`;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,10 +29,6 @@ export interface TitledFormItemLayout {
|
||||
isGroupLabel?: boolean;
|
||||
}
|
||||
|
||||
export interface FormLayout {
|
||||
width: number;
|
||||
}
|
||||
|
||||
class FormItem {
|
||||
constructor(public descriptor: IComponentDescriptor, public config: TitledFormItemLayout) { }
|
||||
}
|
||||
|
||||
@@ -108,7 +108,6 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
||||
if (this._webview && this.html) {
|
||||
this._renderedHtml = this.html;
|
||||
this._webview.html = this._renderedHtml;
|
||||
this._webview.layout();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +141,6 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
||||
this._ready.then(() => {
|
||||
let element = <HTMLElement>this._el.nativeElement;
|
||||
element.style.position = this.position;
|
||||
this._webview.layout();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
}
|
||||
|
||||
public layout(): void {
|
||||
this._webview.layout();
|
||||
// no op
|
||||
}
|
||||
|
||||
public get id(): string {
|
||||
@@ -80,7 +80,6 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
this._html = html;
|
||||
if (this._webview) {
|
||||
this._webview.html = html;
|
||||
this._webview.layout();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,6 +112,5 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
if (this._html) {
|
||||
this._webview.html = this._html;
|
||||
}
|
||||
this._webview.layout();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,6 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
this._html = html;
|
||||
if (this._webview) {
|
||||
this._webview.html = html;
|
||||
this._webview.layout();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +80,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
}
|
||||
|
||||
public layout(): void {
|
||||
this._webview.layout();
|
||||
// no op
|
||||
}
|
||||
|
||||
public sendMessage(message: string): void {
|
||||
@@ -111,6 +110,5 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
if (this._html) {
|
||||
this._webview.html = this._html;
|
||||
}
|
||||
this._webview.layout();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,14 +43,7 @@ export class BareResultsGridInfo extends BareFontInfo {
|
||||
protected constructor(fontInfo: BareFontInfo, opts: {
|
||||
cellPadding: number | number[];
|
||||
}) {
|
||||
super({
|
||||
zoomLevel: fontInfo.zoomLevel,
|
||||
fontFamily: fontInfo.fontFamily,
|
||||
fontWeight: fontInfo.fontWeight,
|
||||
fontSize: fontInfo.fontSize,
|
||||
lineHeight: fontInfo.lineHeight,
|
||||
letterSpacing: fontInfo.letterSpacing
|
||||
});
|
||||
super(fontInfo);
|
||||
this.cellPadding = opts.cellPadding;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import { getRandomTestPath } from 'vs/base/test/node/testUtils';
|
||||
import { IWorkbenchConstructionOptions } from 'vs/workbench/workbench.web.api';
|
||||
|
||||
class TestEnvironmentService implements IWorkbenchEnvironmentService {
|
||||
argvResource: URI;
|
||||
userDataSyncLogResource: URI;
|
||||
settingsSyncPreviewResource: URI;
|
||||
webviewExternalEndpoint: string;
|
||||
|
||||
Reference in New Issue
Block a user