Re: Extended Layout Summary
- From: "Behdad Esfahbod" <behdad behdad org>
- To: "Matthias Clasen" <matthias clasen gmail com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: Extended Layout Summary
- Date: Wed, 21 Nov 2007 15:04:20 -0500
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.
> If you really want
> to be flexible in this, you probably need to go to a TeX-like glue
> model and assign stretchabilities and shrinkabilities to children.
I thought about that. But TeX's model more lends itself to Mathias's
current linear distribution than something like what we are discussing
now. And the linear model is clearly not the best you can do when you
have nonlinearities like ellipsization. What may make sense in this
model is a child priority, yes.
> > b) The allocated size of children should be a continuous function of
> > c_gap. That is, increasing the container size by one pixel should never
> > make drastic changes in the distribution.
>
> This one I fully agree with.
>
--
behdad
http://behdad.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]