Re: [gtk-list] colors




newsham@lava.net (Tim Newsham) writes:

> Hi,
> 
>     I have several widgets I made which allocate their own colors.
> Is this a bad idea?  Would it be better to use a style file some
> how to designate colors, and if so, how is this done?

This depends on a lot of factors:
 
 - Are the widgets for general use? for use within an application?
   For use within your computer?

 - How many colors are you using?

 - Do you care if your stuff works on pseudocolor (i.e., 8-bit) displays?

 - Should users be able to configure the colors?

It's hard to give a general answer except to say that in most cases,
general purpose widgets should constrain themselves to the colors
in the standard style structure. And in fact, most general purpose
widgets should try to draw themselves entirely with GTK+'s paint
functions (gtk_paint_*) if possible.
 
> Also, I want to change the background color of a window that I create.
> What is the proper way to do this?

Either gtk_style_set_background() or gdk_window_set_background() depending
on what you want to set the background to.

Regards,
                                        Owen



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