Re: [Feature Request] Implement GTK_STATE_PRELIGHT for GtkNotebook and others (re: Theme Styles)



On Tue, 2003-09-02 at 18:44, Ryan McDougall wrote:
> On Tue, 2003-09-02 at 15:17, Owen Taylor wrote:
> > 
> > I think this is a reasonable idea - what's been before is
> > prelight for menu bar menu items .. (Windows 95, 98, etc, 
> > have mouse-over for menus.)
> > 
> >  http://bugzilla.gnome.org/show_bug.cgi?id=97878
> > 
> > It would have to be a style property since suddenly passing the
> > PRELIGHT state to the code in existing themes to draw notebook
> > tabs will not work.
> 
> Im not sure I understand. Is it your contention that implementing at the
> GTK level will break previous theme engines? Or are you saying that
> existing theme engines will not be able to handle the additional state?

What I'm saying is that you need to make it optional with a style
property like GtkNotebook::tab-prelight that defaults to FALSE.
The themes that understand it can turn it on. We can even turn
it on for the default theme by turning it on in 

 $datadir/themes/Default/gtk/gtkrc

If we think that's a good idea.

> It seems to me that nothing should break because existing code should
> simply ignore states it doesnt understand. If there are problems
> introducing new states, then 2.4 is a good time to introduce them,
> correct?

Better than 2.2.x, but still not good, if we can avoid having to
have theme engines updated for 2.4, we should avoid having to
have theme engines updated.

The most likely effect on existing theme engines of passing in
a state they don't expect is that they will ignore it and draw
nothing - the tab will vanish on prelight.

> > Unfortunately, I can't really give you much advice on implementation,
> > it's basically just "implement it the same way as other mouse handling
> > and style properties are implemented in other widgets"
> > 
> > I'd guess it would take an experienced GTK+ hacker an hour or two
> > to do, a inexperienced GTK+ hacker longer. How much longer is
> > hard to estimate.
> 
> It would be a lot quicker for you to implement it, but I suppose your
> plate is already quite full. :)

With stuff falling off the sides all over the place.

>  If its up to me I cant promise it'll be
> done any time soon, since school will be starting up again.
> 
> > Regards,
> > 						Owen
> > 
> 
> ps.Thanks for the link to the Theme engine tutorial (exactly what I was
> looking for!) and bug report. I was going to leave a comment, but I cant
> login to bugzilla.gnome.org today for some reason. It wont even email me
> my password... I was going to log a bug regarding the GTK tutorial as
> well.

You should mail a description of your problem to bugmaster gnome org;
they'll be able to help you there.

Regards,
						Owen





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