Bug: Re: [gtk-list] Re: styles and rc files.



Michael Sobolev wrote:
> 
> On Tue, Jan 26, 1999 at 09:26:41AM +0100, Tim Janik wrote:
> > make this
> >      base[NORMAL] = { 0.50, 0.50, 0.50 }
> 
> No, it does not work.
> 
> Do I have to do anything special with widgets except for widget_set_name?


I think there's a bug in GtkListItem. I've just spent a few hours trying to
figure it out. I know that the rc file is parsed OK, and the style is set
properly (I printed out the style colours in a callback).
I'm not using a theme engine or pixmaps. But the background is still white.
(Actually it flashes up grey when the program starts, and then is repainted
as white).

If I add a call to gdk_window_set_background() like this in
gtk_list_item_draw()
the background is displayed in the right color:

     if (widget->state == GTK_STATE_NORMAL)
	{
	  gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
+	  gdk_window_set_background (widget->window,
&widget->style->base[GTK_STATE_NORMAL]);
	  gdk_window_clear_area (widget->window, area->x, area->y, area->width,
area->height);


But I don't understand GTK drawing enough to know what it should be doing.

Damon




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