Tue, 03 Jan 2012 16:34:37 +0100 Pietro Battiston a écrit: > So if there is no left/right alignment rule, the default is just to > distribute them on all the available space, leaving the same empty space > among them or, if you instead set "homogeneous", allocating to each the > same space, which will then possibly be partly empty. > > Your logic could make sense, it is just based on more assumptions.
The GTK3 docs says : http://readthedocs.org/docs/python-gtk-3-tutorial/en/latest/layout.html#boxes "If homogeneous is True, all widgets in the box will be the same size, of which the size is determined by the largest child widget." That's why I would expect homogeneous to mean widgets (for instance buttons) of same size, regardless of expand, as I described in my previous message. This description does not seem to fit reality. In practice, we saw that when homogeneous is set, the N widgets are provided one Nth of the total size, though they don't necessarily fill that space, and this size does not depend on the largest child widget. Well, thinking of it, it does, if the total width is determined by the widgets, which happens if the HBox is the largest. This is not true if it belongs to a VBox with larger HBoxes in it, of if I enlarge the window, for instance. > I anticipate that your reaction will be "but those are ugly hacks", But those are ugly hacks ! > and I guess - but again, I might be wrong - the answer of the developers > would be "what you're trying to do is ugly". Is it ? Perhaps. I had the feeling that the logic I exposed allowed more things to be done with the same amount of parameters. I must be wrong, since people have been working on it much longer than I did. I just don't see why. Anyway, thanks for answering. At least it confirmed I had not missed anything obvious. -- Jérôme _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
