On Sun, 05 Apr 2009 02:18:03 +0300, Tuukka Hastrup wrote
> Tuukka Hastrup wrote:
> > Now, how to best implement a dynamic layout like this in pygtk? We need 
> > a left-aligned (mirror if the language is right-to-left) box layout 
> > which can do ellipsis in the middle to fit its allocated width, plus 
> > some constraints:
> > * the minimum width is condensed root crumb + (condensed parent crumb if 
> > any) + (ellipsis if any) + (condensed current crumb if any)
> > * the natural width is all crumbs in full
> > 
> > Start with the natural layout and continue until we fit in the allocated 
> > width:
> > 1. Condense the root crumb.
> > 2. Replace an increasing amount of the crumbs after the root with the 
> > ellipsis until right before the parent crumb.
> > 3. Condense the parent crumb.
> > 4. Truncate the current crumb to fit.
> > 
> > At least it doesn't sound impossible...
> 
> I've just committed a first version of this to SVN. Known bugs:
> * When we need to truncate, the three dots "..." don't appear.
> * The condensing is done crudely, without taking the real icon size 
> into account.
> * Doesn't check whether the language is right-to-left.


NICE work, Tuukkah!

I noticed a couple of things in playing with the nav system that I wanted to
mention. Not sure how they relate to your list of bugs, but here they are...

1) The Views button gets truncated. From your previous description, I didn't
think that was the intention.

2) In your commit, the Views button also has the dropdown "v" from the
previous version -- is that necessary? I mean, we know it's a button, and as
soon as you click it, you'll see that it drops down instead of doing anything
else... Just a thought...

3) With deep paths, the root crumb changes to "..." without being a button.

4) The root crumb doesn't have an icon, but the subdirectory crumbs do. For
the sake of consistency, shouldn't the root crumb also have an icon? Then when
you truncate it, it truncates to the icon?

5) Just an idea: Does it make sense to rename the "Filesystem" label to
"Files"? It's shorter, and accurately expresses the view. (I like "File
System" as a label, but it really is too long to be practical.)

6) The parent crumb doesn't truncate to the icon alone. It truncates to the
icon plus about half of the first letter.

7) The current crumb doesn't ever truncate. It's always full size and
truncates things that precede it.

That's all I noticed.

Keep up the good work!!


_______________________________________________
Sonata-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/sonata-users

Reply via email to