From 663745c7e8c2daffce0f3994c8eb44a40001679c Mon Sep 17 00:00:00 2001 From: Paul Culley Date: Thu, 21 Jun 2018 20:04:30 -0500 Subject: [PATCH] Fix Gramplet configure (View/Configure) for large options (#629) When a Gramplet uses a BooleanListOption with a lot of entries, along with other options, all the options take on the size of the large BooleanListOption, which doesn't work well at all. --- gramps/gui/widgets/grampletpane.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/gramps/gui/widgets/grampletpane.py b/gramps/gui/widgets/grampletpane.py index a32160bbd..65b7fb43f 100644 --- a/gramps/gui/widgets/grampletpane.py +++ b/gramps/gui/widgets/grampletpane.py @@ -566,19 +566,17 @@ class GuiGramplet: if len(self.pui.option_order) == 0: return frame = Gtk.Frame() topbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) - hbox = Gtk.Box(spacing=5) - labels = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, - homogeneous=True) - options = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, - homogeneous=True) - hbox.pack_start(labels, False, True, 0) - hbox.pack_start(options, True, True, 0) + hbox = Gtk.Grid() + hbox.set_column_spacing(5) topbox.pack_start(hbox, False, False, 0) + row = 0 for item in self.pui.option_order: label = Gtk.Label(label=item + COLON) label.set_halign(Gtk.Align.END) - labels.pack_start(label, True, True, 0) - options.pack_start(self.pui.option_dict[item][0], True, True, 0) # widget + hbox.attach(label, 0, row, 1, 1) + # put Widget next to label + hbox.attach(self.pui.option_dict[item][0], 1, row, 1, 1) + row += 1 save_button = Gtk.Button.new_with_mnemonic(_('_Save')) topbox.pack_end(save_button, False, False, 0) save_button.connect('clicked', self.pui.save_update_options)