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:
- Adding custom icon without gresource, icon lookup fails
- How do I use custom icons in my Gnome Builder (vala) application? - #3 by mazharhussain
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
src/icons/symbolic/*-symbolic.svg
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 -->
<file>icons/symbolic/people-symbolic.svg</file>
<file>icons/symbolic/check-plain-symbolic.svg</file>
<file>icons/symbolic/train-load-extreme-symbolic.svg</file>
</gresource>
Which are then compiled by meson
teams_sources += gnome.compile_resources('teams-resources',
'teams.gresource.xml',
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?