mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -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:
@@ -12,7 +12,7 @@ import { Disposable } from 'vs/base/common/lifecycle';
|
||||
export interface IIconLabelCreationOptions {
|
||||
supportHighlights?: boolean;
|
||||
supportDescriptionHighlights?: boolean;
|
||||
supportOcticons?: boolean;
|
||||
supportCodicons?: boolean;
|
||||
}
|
||||
|
||||
export interface IIconLabelValueOptions {
|
||||
@@ -77,7 +77,7 @@ class FastLabelNode {
|
||||
}
|
||||
|
||||
this._empty = empty;
|
||||
this._element.style.marginLeft = empty ? '0' : null;
|
||||
this._element.style.marginLeft = empty ? '0' : '';
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
@@ -99,14 +99,14 @@ export class IconLabel extends Disposable {
|
||||
|
||||
this.labelDescriptionContainer = this._register(new FastLabelNode(dom.append(this.domNode.element, dom.$('.monaco-icon-label-description-container'))));
|
||||
|
||||
if (options && options.supportHighlights) {
|
||||
this.labelNode = new HighlightedLabel(dom.append(this.labelDescriptionContainer.element, dom.$('a.label-name')), !!options.supportOcticons);
|
||||
if (options?.supportHighlights) {
|
||||
this.labelNode = new HighlightedLabel(dom.append(this.labelDescriptionContainer.element, dom.$('a.label-name')), !!options.supportCodicons);
|
||||
} else {
|
||||
this.labelNode = this._register(new FastLabelNode(dom.append(this.labelDescriptionContainer.element, dom.$('a.label-name'))));
|
||||
}
|
||||
|
||||
if (options && options.supportDescriptionHighlights) {
|
||||
this.descriptionNodeFactory = () => new HighlightedLabel(dom.append(this.labelDescriptionContainer.element, dom.$('span.label-description')), !!options.supportOcticons);
|
||||
if (options?.supportDescriptionHighlights) {
|
||||
this.descriptionNodeFactory = () => new HighlightedLabel(dom.append(this.labelDescriptionContainer.element, dom.$('span.label-description')), !!options.supportCodicons);
|
||||
} else {
|
||||
this.descriptionNodeFactory = () => this._register(new FastLabelNode(dom.append(this.labelDescriptionContainer.element, dom.$('span.label-description'))));
|
||||
}
|
||||
@@ -129,10 +129,10 @@ export class IconLabel extends Disposable {
|
||||
}
|
||||
|
||||
this.domNode.className = classes.join(' ');
|
||||
this.domNode.title = options && options.title ? options.title : '';
|
||||
this.domNode.title = options?.title || '';
|
||||
|
||||
if (this.labelNode instanceof HighlightedLabel) {
|
||||
this.labelNode.set(label || '', options ? options.matches : undefined, options && options.title ? options.title : undefined, options && options.labelEscapeNewLines);
|
||||
this.labelNode.set(label || '', options?.matches, options?.title, options?.labelEscapeNewLines);
|
||||
} else {
|
||||
this.labelNode.textContent = label || '';
|
||||
}
|
||||
@@ -144,14 +144,14 @@ export class IconLabel extends Disposable {
|
||||
|
||||
if (this.descriptionNode instanceof HighlightedLabel) {
|
||||
this.descriptionNode.set(description || '', options ? options.descriptionMatches : undefined);
|
||||
if (options && options.descriptionTitle) {
|
||||
if (options?.descriptionTitle) {
|
||||
this.descriptionNode.element.title = options.descriptionTitle;
|
||||
} else {
|
||||
this.descriptionNode.element.removeAttribute('title');
|
||||
}
|
||||
} else {
|
||||
this.descriptionNode.textContent = description || '';
|
||||
this.descriptionNode.title = options && options.descriptionTitle ? options.descriptionTitle : '';
|
||||
this.descriptionNode.title = options?.descriptionTitle || '';
|
||||
this.descriptionNode.empty = !description;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
opacity: 0.75;
|
||||
font-size: 90%;
|
||||
font-weight: 600;
|
||||
padding: 0 12px 0 5px;
|
||||
padding: 0 16px 0 5px;
|
||||
margin-left: auto;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -74,4 +74,4 @@
|
||||
.monaco-list-row.focused.selected .label-description,
|
||||
.monaco-list-row.selected .label-description {
|
||||
opacity: .8;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user