Re: patch for gtkscrolledwindow





On 24 Feb 1999, Owen Taylor wrote:

> 
> 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

I believe that my additions are really spureous in the sense that they
don't affect the behavior of the scrolledwindow (and its child) unless you
set a shadow_type != GTK_SHADOW_NONE, and you couldn't loose anything
putting it right now. Off course I understand you point of view and I
respect your decision, but you can see thet the patch consists only in a
couple of lines of code that don't affect the original behavior.

Of course the changes in the other widgets can wait, the patch will not
affect them, you will only have a new simple and usefull feature in
gtkscrolledwindow (you could try it adding a shadow to gtklayout's
scrolledwindow in testgtk).

Thank you for considering it
Regards,
<ADRIAN>



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