diff --git a/gramps/gui/editors/editreference.py b/gramps/gui/editors/editreference.py index 7d41c68734e..2937b497a42 100644 --- a/gramps/gui/editors/editreference.py +++ b/gramps/gui/editors/editreference.py @@ -128,6 +128,17 @@ def enable_warnbox(self): def define_expander(self, expander): expander.set_expanded(True) + expander.connect("activate", self.__on_expand) + + def __on_expand(self, expander): + """ + Sets the packing of the expander widget to depend on whether or not + it is expanded. + """ + state = not expander.get_expanded() + parent = expander.get_parent() + parent.set_child_packing(expander, state, state, 0, Gtk.PackType.START) + expander.set_vexpand(state) def _post_init(self): """ diff --git a/gramps/gui/glade/editeventref.glade b/gramps/gui/glade/editeventref.glade index cd3e25bf92a..5260b805fca 100644 --- a/gramps/gui/glade/editeventref.glade +++ b/gramps/gui/glade/editeventref.glade @@ -99,6 +99,7 @@ True True + True 6 @@ -207,6 +208,7 @@ True True + True False diff --git a/gramps/gui/glade/editplaceref.glade b/gramps/gui/glade/editplaceref.glade index 0d2acf933a2..4e2c51cebdd 100644 --- a/gramps/gui/glade/editplaceref.glade +++ b/gramps/gui/glade/editplaceref.glade @@ -100,6 +100,7 @@ True True + True 6 @@ -185,6 +186,7 @@ True True + True False diff --git a/gramps/gui/glade/editreporef.glade b/gramps/gui/glade/editreporef.glade index 0c0e1438feb..4aa0605b6e8 100644 --- a/gramps/gui/glade/editreporef.glade +++ b/gramps/gui/glade/editreporef.glade @@ -111,6 +111,7 @@ True True + True 6