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. _______________________________________________ Sonata-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/sonata-users
