Re: GtkStyle changes



Anders Melchiorsen <and@kampsax.dtu.dk> writes:
> 	if (gdk_colormap_alloc_color(colormap, &redcolor, FALSE, TRUE))
> 		redstyle->fg[GTK_STATE_NORMAL] = redcolor;
> 	

Normally GTK will allocate these colors for you, but CList could be on
crack, I wouldn't be surprised.
 
> However, when changing GTK+ themes (using gnomecc), the old style will
> be left. That looks quite ugly when the theme is changing the
> background of my GtkCList. How can I avoid this?
>

For widgets, you avoid this by changing RcStyle instead of Style, then
calling gtk_widget_modify_style. For CList cells, see below...
 
> Is there a way to get notified when the theme changes so I can
> recreate my style variable?
> 

style_set signal, should be called on theme change.

> Or is there a way to set the foreground of just one cell so it does
> not matter that the background is changing?
> 

There should be, but I don't know if there actually is.

Havoc




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