Re: using personal icons in the GtkScaleButton
- From: John Williams <asb1231 gmail com>
- To: Tadej Borovšak <tadeboro gmail com>
- Cc: gtk-list gnome org
- Subject: Re: using personal icons in the GtkScaleButton
- Date: Sat, 5 Jun 2010 12:54:26 -0300
Thank you Tadej for all.
For the second option, just add the images folder to the theme search
patch with gtk_icon_theme_append_search_path will resolve the problem?
How, by the code, I connect the GtkIconTheme to the GtkIconFactory? Or
it is done automatically? I have tried:
GtkIconTheme *theme = gtk_icon_theme_get_default();
But the broken image keep happening.
2010/6/4 Tadej Borovšak <tadeboro gmail com>:
> I decided to look into these things (stock items, stock icons and
> named icons) a bit more once again (it's been a while since I last did
> that anyway). I'll describe their usage from regular developer's point
> of view ("How to use this things?").
> First, this is simple diagram demonstrates how things fit together:
> .-----------------------. .-----------. .-------.
> | image from icon theme | | GdkPixbuf | | image |
> '-----------+-----------' '-----+-----' '---+---'
> | | |
> .------ˇ-----. | |
> | named icon | | |
> '------+-----' .---------' |
> | | |
> '-------. | .--------------------'
> | | |
> .--ˇ---ˇ--ˇ--. .------------.
> | stock icon | <- same ID -> | stock item |
> '------------' '------------'
> You can see here that named icons are part of the icon theming
> machinery while stock icons can use named icons as one source of
> icons, but there are other ways of getting images. I added stock items
> into the mix just to demonstrate that they are actually completely
> separate thing and are only connected with stock icons through shared
> Now to the problem at hand: scale button and custom icons. First thing
> I realized is that icons on scale button are named icons, which means
> that they must reside in icon theme. This is probably done on purpose,
> since it gives theme creators an opportunity to theme your scale
> button too. But it also represents one major headache for developers,
> since icons need to be installed in hicolor icon theme. I think that
> it would be nice to extend scale button a bit and offer additional
> methods of setting icons, but even if this does happen, it won't help
> you much right now.
> So basically you'll need to install your icons somewhere where theming
> system will be able to find it. One option would be to install them
> inside hicolor theme. Second option would be to install your icon
> somewhere under your application's data folder and add that folder to
> theme search path using gtk_icon_theme_append_search_path().
> I hope this will help you get your application working.
> Tadej Borovšak
> tadeboro gmail com
> tadej borovsak gmail com
] [Thread Prev