diff options
author | Havoc Pennington <hp@pobox.com> | 2010-09-06 12:26:32 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-10-13 10:40:07 -0400 |
commit | 031856eb3321ac8043c80ce98ee6c1d051b48d6e (patch) | |
tree | bfdee0e0e5d62944074fc050dbef763a7cb26f02 /tests/testexpand.c | |
parent | 7d5a85c3ad6ba6aa891edcafd8cdb3d397184002 (diff) | |
download | gtk+-031856eb3321ac8043c80ce98ee6c1d051b48d6e.tar.gz |
Add horizontal and vertical expand flags, compute_expand() to GtkWidget
GtkWidget now has flags for horizontal and vertical expand, and
a compute_expand() method. compute_expand() is used by containers
to set a default expand flag. (If a widget has expand set explicitly,
it always overrides the results of compute_expand.)
GtkContainer has a default implementation of compute_expand which
simply walks over all child widgets and sets expand=TRUE
if any child is expanding.
The overall effect is that you only have to set expand on
leaf nodes in the widget tree, while previously you had to
set expand all the way up the tree as you packed every
container. Also, now containers need not have their own child
properties for expand.
For old containers which do have "expand" child properties,
they should override compute_expand and include the child
properties in whether the container is expand=TRUE.
Also, the old container should use
"child_prop_expand || gtk_widget_compute_expand()" everywhere
it previously used simply "child_prop_expand"
https://bugzilla.gnome.org/show_bug.cgi?id=628902
Diffstat (limited to 'tests/testexpand.c')
0 files changed, 0 insertions, 0 deletions