Re: [gtk-list] Re: Spin button question



On Thu, Jun 03, 1999 at 11:15:21AM +0100, Steve Hosgood wrote:

> If the current spinbutton does its own arrow-drawing and handling for "efficiency
> reasons" as Havoc suggests, should that really be allowable in the allegedly-O-O
> environment of GTK+?
>
> If the "efficiency reasons" really are that important, does it indicate that there's
> something wrong in the O-O implementation somewhere that makes it so inefficient?

Well, gtk allows only one inheritance. So the question is which
inheritance is useful or more important. I don't want to loose the
possibility to use something like GTK_ENTRY (spinbutton). Spinbutton
would become a container or even worse a hbox if the arrows would be
changed to widgets. That way you would focus the inheritance on layout
instead of widget functionality.
BTW gtk{h,v}scrollbar and gtknotebook handle the arrows very similar.

> I don't know, but I'd guess that if indeed spinbutton does its own arrow handling, then
> won't those arrows fail to change in appearance if a custom theme changes the appearance
> of the other arrows in the widget set?

No. Spinbutton uses gtk_paint_arrow to draw the arrows. So basically all
you have to do is to change style->draw_arrow to change the appearance.

bye,
  Lars



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