Vala missing GResources compiled icons

I have three icons I would like to use in my vala-application I am trying to develop in GNOME Builder.

I’ve read various topics here and tried some of the approaches:

the last answer sticked out to me because it promised me not to have to mess with Gtk.IconTheme.
Unfortunately, I’ve just begun working with Builder and co., I crafted something together in Workbench and then got the Icons following the guide from icon-library so I can’t tell exactly what’s causing the problem.

My Icons are now located at
in my window.ui they are included like
<property name="icon-name">people-symbolic</property>

In my GResources I’ve included the icons like recommended in the answer in the second link:

  <gresource prefix="/fr/lj/teams/">
    <!-- ui files -->


Which are then compiled by meson

teams_sources += gnome.compile_resources('teams-resources',
  dependencies: blueprints,
  c_name: 'teams'

and compiled in the application, because they’re now part of teams_sources list.

I have also done some print-debugging using Gtk.IconTheme.get_icon_names(), my icons were in fact not included in the list of icon names.

I don’t know where to continue troubleshooting and would be grateful for any pointers, maybe it’s only a small issue with the gresources?

I have found that the icons are rendered when I strip the /symbolic from the path in application.gresurces.xml (and move the icons accordingly).
How can I have Gtk (or Gdk?) also find my symbolic icons, the ‘normal’ icons don’t seem to recolor when switching themes.

What works for me is this:

Together with src/Resources.vala · master · GNOME / shotwell · GitLab

I’m not 100% sure about this, but I think the icon folders structure shall follow the paths described in the hicolor’s index.theme file to be properly recognized.

Also, the symbolic/ subfolder should be reserved for applications’s symbolic icons only. Normal symbolic icons shall be under scalable/xxx/ subfolder, with a *-symbolic.svg extension.

Official reference:

This worked for me, thank you for the solution and reference hint.

I got confused by the symbolic/ subfolder, under scalable/apps, they will be rendered on-screen.

Can I specify my own subfolders, like scalable/categories if I put a index.theme in my icons/ folder with an entry like this?

1 Like

My understanding is that when you’ve a structure like icons/scalable/categories (i.e. without explicit icon theme name) then the hicolor.index.theme will be used as fallback.

The scalable/categories already exists in there, so no need to specify it again.

I never tried to redefine my own index.theme, not sure what will happen…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.