Re: questions re: aux info, size request



On Sun, 2010-09-12 at 01:01 -0400, Havoc Pennington wrote:
> Hi,
> 
> On Sun, Sep 12, 2010 at 12:45 AM, Tristan Van Berkom
> <tristanvb openismus com> wrote:
> > While on this topic, there's this XXX comment I left dangling
> > in gtksizegroup.c:
> >   http://git.gnome.org/browse/gtk+/tree/gtk/gtksizegroup.c#n677
> >
> > I was thinking maybe that for all the widgets in a group to be
> > effectively the same size, maybe we should be basing the minimum
> > base requests from the natural requests of all widgets in a group.
> 
> I would expect that GtkSizeGroup caused all widgets in the group to
> request a min size of the largest min size in the group, and a natural
> size of the largest natural size in the group. Then it Just Works,
> right? Is there a reason that only one of min or natural can be picked
> for size group?

Hmmm your right this behaviour is probably a bit buggy (at the time
my target was more to make widgets actually all receive the same
size, it seemed less important to synchronize every natural size in the
group).

Ofcourse the way sizegroups are mishmashed into the request api it will
be a bit tricky to fix but I'll consider the current implementation
buggy and go ahead and perfect that.

> > But if set_size_request() were to limit the natural size; combining
> > it with sizegroups that demand/require the natural size as a minimum
> > might work nicely.
> 
> To be clear, I was proposing a set_natural_size() or something (i.e. I
> think making set_size_request set natural would be too incompatible)
> 
> It might be clearer to rename set_size_request to set_minimum_size()
> but that function is maybe too heavily used to rename... at least
> without keeping the old name also.

Ok I see, so we end up with:
  - set_size_request() Can be used to increase the minimum request
  - set_natural_size() Could be added to explicitly "set"
    the natural size to anything greater than the minimum size
    (greater or less than the widget's original natural request)

Sounds good :)

Cheers,
    -Tristan




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