[Gtk-sharp-list] Icons
Baltasar García Perez-Schofield
baltasarq at gmail.com
Thu Jan 21 09:30:02 UTC 2016
Hi, there,
Since the "strange desapparition" of stock icons, I've been struggling to
put icons in my apps.
I use Gtk.Action a lot, so, after loading the icon from resources, I've
converted this:
var actOpen = new Gtk.Action( "open", "Open", "Open file", Gtk.Stock.Open );
To this:
var actOpen = new Gtk.Action( "open", "Open", "Open file", "open" ) {
IconName = "open" };
After including hte icon in the IconTheme:
Gtk.IconTheme.AddBuiltin( "open", 32, iconOpen );
And it works.
Is this correct? Is it the expected way to achieve this?
I would have expected to do something like creating my own IconTheme:
var iconTheme = new Gtk,IconTheme();
iconTheme.Add( "open", 32, iconOpen );
...
Gtk.IconTheme.Default = iconTheme.
But haven't found a clue of how it is done, or whether it should be done or
not.
-- baltasar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20160121/5c17edf1/attachment.html>
More information about the Gtk-sharp-list
mailing list