[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-devel
Subject:    Re: Extended Layout Summary
From:       "Matthias Clasen" <matthias.clasen () gmail ! com>
Date:       2007-11-22 3:10:26
Message-ID: cbccc63c0711211910q8965179x5e4edcaeeba48072 () mail ! gmail ! com
[Download RAW message or body]

On Nov 21, 2007 3:04 PM, Behdad Esfahbod <behdad@behdad.org> wrote:
> On Nov 20, 2007 10:07 PM, Matthias Clasen <matthias.clasen@gmail.com> wrote:
> > On Nov 20, 2007 8:45 PM, Behdad Esfahbod <behdad@behdad.org> wrote:
> >
> > >     a) Maximize number of children taking their natural size.
> >
> > I am not convinced this is always the best strategy. Doesn't this
> > encourage starving
> > one child in favour of the rest of the pack getting their natural size?
>
> Right.  We can add another goal to avoid starvation:
>
>   c) If child i takes its natural size and child j doesn't, child j
> should have received at least as much gap as child i.
>
> The algorithm I sketched satisfies this too.

Yeah, true.
Alternatively:  there shall not be both children who receive less than
their natural width and children that receive more than their natural
width.

Anyway, I don't think that the example of "bunch of ellipsiizing
labels" can be generalized to make the
case that the hippo-style algorithm is always better than some linear
distribution scheme.

One thing that I have not seen mentioned in this discussion so far is
the fact that it is ultimatively an implementation detail of the
container how it distributes its allocation to its children. There is
nothing
prohibiting a linearly-distributing container and a hippo-style
container from coexisting. Both can use
the same extended layout interface. It would also be possible to make
the distribution algorithm
pluggable.


Matthias
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic