On Sun, 13 Jun 2021, Henrique Andrade wrote:
Dear Allin,
I'm playing around with Gretl code trying to replace the original icons with
the system icons. My aim goal is to try to familiarize myself with the gretl
GUI code to eventually contribute more in that field.
I'm using elementaryOS (Ubuntu-based distro) that uses ".svg" icons and
has,
IMHO, a great user interface inside the desktop Linux world.
The piece of code I think I need to change is the file "gui/toolbar.c". Am I
right?
What I'm doing right now is copying the system ".svg" icons, converting to
".xpm" and saving/replacing the originals with the new ones inside the
"pixmaps" folder.
Is that the right thing to do? More, could I use the ".svg" icons directly
without conversions to ".xpm"?
This is something the devel team has discussed lately, so your
message is well timed! We haven't actually done any work on it yet,
but here's what I'm thiking.
* You're right, gui/toolbar.c is the primary file relating to our
toolbar icons.
* Replacing the original xpms with new ones will work, but you won't
get any auto-scaling. It should be possible to use the SVGs as such.
One place to look is
https://developer.gnome.org/gtk3/stable/GtkIconTheme.html#gtk-icon-theme-...
As I understand it, this allows you to add your own scalable icons
as if they were part of the "hicolor" theme. You can see whether
your gtk-pixbuf installation can load SVG files by calling
gdk-pixbuf-query-loaders
or maybe gdk-pixbuf-query-loaders-64
Allin