Re: patch for gtkscrolledwindow




adrian <feiguin@ifir.ifir.edu.ar> writes:

> Self scrolling widgets (gtklayout, gtkclist,gtkctree, gtkviewport,
> gtktext, and the next version of gtksheet) are added to a scrolledwindow
> with their own viewport, and they have to draw the frame where they are
> displayed. This can be seen in some of these
> files in widget_class->expose_event and widget_class->draw as a
> gtk_draw_shadow. Also, they have to spend effort in considering the
> border width with a lot of widget->style->klass->x/ythickness in the code.
> 
> I believe that a much more elegant way to deal with this is adding a
> shadow_type field to the GtkScrolledWindow structure, and a
> gtk_scrolled_window_set_shadow_type function. The default value is
> GTK_SHADOW_NONE,
> and the scrolledwindow works as the current gtkscrolledwindow. If you set
> GTK_SHADOW_IN, a nice shadow frame appears arround the viewport. 
> 
> If this patch is implemented, the above mentioned widgets can be
> re-written omiting all the x/ythickness code, and it became much easier to
> deal with the adjustments and size allocation. In gtkviewport you can
> remove gtk_viewport_paint, for example.

I think this is a better way of doing things in many ways. 
(Backwards compatibility may be a bit of a problem if the
border is removed from the widgets that already have it)

I haven't looked at your patch in detail, but it definitely
is worth considering as a future addition.

Unfortunately, we are in the final stages of putting together
1.2 right now, so feature-addition patches like this one
need to wait for the upcoming 1.3 development branch.

Regards,
                                        Owen



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