Skip to main content
Solved

Display SVG Icons in Treeview

  • October 4, 2024
  • 3 replies
  • 85 views

Harm Horstman
Superhero
Forum|alt.badge.img+21

We ran into the problem that SVGs were not displayed in tree views. (Universal GUI 2024.2.14)

After adding this to custom.css, the svg icons became visible:

svg {
width: 24px;
height: 24px;
}

Side effect of this, is that charts are no longer displayed.

 

I don’t believe this is solved as was mentioned in this post:


What can we do now?

 

Best answer by Arie V

@Harm Horstman saw this at another customer too. This most likely has to do with the fact that your SVG files contain (unusual values for) height & width parameters. A workaround for now is to edit the SVG and completely remove the height & width parameters, leaving it up to the GUI to determine the sizing properly.

In the meantime we’ll aim for fixing this issue, based on the TCP you also raised.

This topic has been closed for replies.

3 replies

Arie V
Community Manager
Forum|alt.badge.img+12
  • Community Manager
  • Answer
  • October 4, 2024

@Harm Horstman saw this at another customer too. This most likely has to do with the fact that your SVG files contain (unusual values for) height & width parameters. A workaround for now is to edit the SVG and completely remove the height & width parameters, leaving it up to the GUI to determine the sizing properly.

In the meantime we’ll aim for fixing this issue, based on the TCP you also raised.


Harm Horstman
Superhero
Forum|alt.badge.img+21
  • Author
  • Superhero
  • October 4, 2024

Hi @Arie V , yes this is the problem, I’ve tried to remove the width and height tags and after this is worked.

Anyways, I did not see a link between this problem and not working charts. 

Maybe future issues can be eliminated with a validation rule for this?


Erik Brink
Moderator
Forum|alt.badge.img+5
  • Moderator
  • November 3, 2025

From version 2025.2.13.0 on, the Universal GUI strips away hard sizes from the root <svg> tag of SVG icons shown in the UI at all different locations. That should fix problems like this.