Re: GNOME CVS: gtk+ timj




Tim Janik <timj@gtk.org> writes:

> On 3 Sep 1998, Owen Taylor wrote:
> 
> > 
> > Gnome CVS User <gnomecvs@cvs.labs.redhat.com> writes:
> > 
> > > CVSROOT:	/debian/home/gnomecvs
> > > Module name:	gtk+
> > > Changes by:	timj	98/09/03 02:38:55
> > 
> > > * gtk/gtknotebook.c:
> > > (gtk_notebook_real_switch_page): expose tabs.
> > 
> > 
> > ====
> >   gtk_notebook_pages_allocate (notebook, &GTK_WIDGET (notebook)->allocation);
> >   gtk_notebook_expose_tabs (notebook);
> >   
> >   if (GTK_WIDGET_MAPPED (notebook))
> >     {
> >       if (GTK_WIDGET_REALIZED (notebook->cur_page->child))
> > 	gtk_widget_map (notebook->cur_page->child);
> >       else
> > 	{
> > 	  gtk_widget_map (notebook->cur_page->child);
> > 	  gtk_widget_size_allocate (GTK_WIDGET (notebook), 
> > 				    &GTK_WIDGET (notebook)->allocation);
> > 	}
> >     }
> >   
> >   if (GTK_WIDGET_DRAWABLE (notebook))
> >     gtk_widget_queue_draw (GTK_WIDGET (notebook));
> > ====
> > 
> > ????
> > 
> > Unless I am confused, redrawing the entire notebook should
> > alleviate the need for _expose_tabs()...
> 
> redrawing the entire notebook does not expose the tabs.
> maybe that should be changed, in which case the above function
> call can vanish, but currently the notebook code seems to be
> able to get away without it.
> if you remove the tab exposition from gtk_notebook_real_switch_page,
> you'll see that the tab pixmaps from the testgtk example won't
> be redrawn upon page switches, and thus leave the pixmap of the
> old selected tab label highlighted until you cause a redraw somehow.

This is one of the fundemental drawing bugs that gtk-themes fixes. The
problem is that pixmaps/labels have transparent portions, but not
really. So they don't redraw properly on state changes. (The
problem more precisely is that the labels redraw with the background
of the notebook widget, but the notebook widget itself hasn't
changed state)

So, it is probably OK as a temporary hack, but it shouldn't go into
the themes branch. (I'm merging that up to current GTK+ now.)

Regards,
                                        Owen



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