GNOME Bugzilla – Bug 765602
GtkExpander label and child no longer fill the available space in 3.20
Last modified: 2018-05-02 17:05:35 UTC
Two problems: 1) gtk_expander_set_label_fill() no longer works. Any idea how to get the label to expand horizontally? 2) The child of GtkExpander no longer fills the available space. This can be worked around by setting h/vexpand on the child, but imo this should work without it.
Created attachment 326752 [details] screenshot 3.18 and 3.20
Created attachment 326753 [details] example Python code
It appears that the label_fill field is not used at all, currently.
observation for GTK+ 3: whereas gtk_box_gadget_insert_object() has expand and align arguments, gtk_box_gadget_insert_widget() just passes through to insert_object() but forces no expansion and GTK_ALIGN_FILL. So, :halign is a no-op here. GTK+ 4 just uses a Box for the title widget, so it should be fairly easy to make the label fill (or any other alignment) there, though it seems to need hexpand too, to have any effect. But would label-fill really be useful in practice anyway? Since it's considered wontfix to have clickable things in the label*, the practically useful widgets are limited to things that don't act differently when told to fill. * https://bugzilla.gnome.org/show_bug.cgi?id=318169
I use various clickable widgets in the expander widget with a button on the right hand side for hiding the expander. I currently work around this issue by faking a large min required width for the main box in there.
(In reply to Daniel Boles from comment #4) > observation for GTK+ 3: whereas gtk_box_gadget_insert_object() has expand > and align arguments, gtk_box_gadget_insert_widget() just passes through to > insert_object() but forces no expansion and GTK_ALIGN_FILL. So, :halign is a > no-op here. questions are then: Why does insert_widget() not take parameters for these? Should it? If yes, we should update Box Gadget. If not (for whatever reason), we can presumably just insert_object() from GtkExpander with the values we want. Anyway, both GTK+ 3 and 4 would then need :label-fill hooking back up to actually do what it's meant to do.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/617.