fix missing icons in symbol search picker

This commit is contained in:
Johannes Rieken 2018-07-19 11:11:12 +02:00
parent eab1a7ad1f
commit 9eedfdc260
3 changed files with 3 additions and 3 deletions

View file

@ -646,7 +646,7 @@ export const symbolKindToCssClass = (function () {
_fromMapping[SymbolKind.TypeParameter] = 'type-parameter';
return function toCssClassName(kind: SymbolKind): string {
return _fromMapping[kind] || 'property';
return `symbol-icon ${_fromMapping[kind] || 'property'}`;
};
})();

View file

@ -162,7 +162,7 @@ export class OutlineRenderer implements IRenderer {
renderElement(tree: ITree, element: OutlineGroup | OutlineElement, templateId: string, template: OutlineTemplate): void {
if (element instanceof OutlineElement) {
template.icon.className = `outline-element-icon symbol-icon ${symbolKindToCssClass(element.symbol.kind)}`;
template.icon.className = `outline-element-icon ${symbolKindToCssClass(element.symbol.kind)}`;
template.label.set(element.symbol.name, element.score ? createMatches(element.score[1]) : undefined, localize('title.template', "{0} ({1})", element.symbol.name, OutlineRenderer._symbolKindNames[element.symbol.kind]));
template.detail.innerText = element.symbol.detail || '';
this._renderMarkerInfo(element, template);

View file

@ -93,7 +93,7 @@ class Item extends BreadcrumbsItem {
if (this.options.showSymbolIcons) {
let icon = document.createElement('div');
icon.className = `symbol-icon ${symbolKindToCssClass(this.element.symbol.kind)}`;
icon.className = symbolKindToCssClass(this.element.symbol.kind);
container.appendChild(icon);
dom.addClass(container, 'shows-symbol-icon');
}