Re: [gtk-list] Re: Adding theme support to programs



Thus spoke Dave
> ...and yet this is not quite the case. I've just compiled vim 5.4p, which
> has GTK support for its GUI version. No theme support there. The widgets
> are plain and relatively dull. If I change the gtk_init() to gnome_init()
> then magically everything's themed. However, I don't want to have to make
> something into a gnome project just to get theming. So presumably I do
> have to call something from gtk to get theming to work...what?
> 
> There are various other programs I've compiled which are linked to a theme
> aware version of GTK, yet they don't have themed widgets. So I'm
> confoooosed!

Leave gtk_init() in place.  Add a ~/.gtkrc file with the theme of interest
(or add to the application specific directory, such as .gimp/gtkrc).
Be certain you have the gtk-engines package installed.  I think that's all
there is to it.

Alternatively, you can have an application parse it's own gtkrc file using
gtk_parse_rc().

gtk-engines isn't required as long as you don't need the various engines
(lodable libs) it uses.  For generic themeing, where you just add
background pixmaps and interesting color schemes, you don't need gtk-engines.
If the gtkrc file you use has a line like this

	engine "pixmap"

(or some other engine) then you will need the gtk-engines package installed
in order to use that theme.

I'm no expert with themes, but this what I did with XNotesPlus.
-- 
Michael J. Hammel           |
The Graphics Muse           |   Chinese Proverb:
mjhammel@graphics-muse.org  |      Man who eat many prunes get good run for
http://www.graphics-muse.org       money.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]