mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 09:35:38 -05:00
* Fix contributed icons for ModelView trees not showing
* Use asCssUrl
(cherry picked from commit 2be1394748)
This commit is contained in:
@@ -147,8 +147,8 @@ export class TreeComponentRenderer extends Disposable implements IRenderer {
|
||||
*/
|
||||
public renderElement(tree: ITree, element: ITreeComponentItem, templateId: string, templateData: TreeDataTemplate): void {
|
||||
const icon = this.themeService.getColorTheme().type === ColorScheme.LIGHT ? element.icon : element.iconDark;
|
||||
const iconUri = icon ? URI.revive(icon) : null;
|
||||
templateData.icon.style.backgroundImage = iconUri ? `url('${iconUri.toString(true)}')` : '';
|
||||
const iconUri = icon ? URI.revive(icon) : undefined;
|
||||
templateData.icon.style.backgroundImage = dom.asCSSUrl(iconUri);
|
||||
templateData.icon.style.backgroundRepeat = 'no-repeat';
|
||||
templateData.icon.style.backgroundPosition = 'center';
|
||||
templateData.icon.classList.toggle('model-view-tree-node-item-icon', !!icon);
|
||||
|
||||
Reference in New Issue
Block a user