Skip to content

Commit

Permalink
Tidy up Addon Manager project editor dialog
Browse files Browse the repository at this point in the history
Set entry widgets to expand, align labels and adjust margins
and spacing.
  • Loading branch information
Nick-Hall committed Jul 29, 2023
1 parent d443017 commit 57477b3
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions gramps/gui/plug/_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,25 +687,29 @@ def edit_project(self, row):
title = _('New Project')
else:
title = _('Edit Project')
dialog = Gtk.Dialog(title=title,
transient_for=self.window)
dialog.set_border_width(12)
dialog.vbox.set_spacing(10)
hbox = Gtk.Box()
dialog = Gtk.Dialog(title=title, transient_for=self.window)
dialog.set_border_width(6)
dialog.vbox.set_spacing(6)

grid = Gtk.Grid()
grid.set_row_spacing(6)
grid.set_column_spacing(6)
label = Gtk.Label(label=_("%s: ") % _('Project name'))
hbox.pack_start(label, True, True, 0)
label.set_halign(Gtk.Align.END)
grid.attach(label, 0, 0, 1, 1)
name = Gtk.Entry()
name.set_hexpand(True)
name.set_text(row.project[0])
name.set_activates_default(True)
hbox.pack_start(name, False, True, 0)
dialog.vbox.pack_start(hbox, False, True, 0)
hbox = Gtk.Box()
grid.attach(name, 1, 0, 1, 1)
label = Gtk.Label(label=_("%s: ") % _('Url'))
hbox.pack_start(label, True, True, 0)
label.set_halign(Gtk.Align.END)
grid.attach(label, 0, 1, 1, 1)
url = Gtk.Entry()
url.set_hexpand(True)
url.set_text(row.project[1])
hbox.pack_start(url, False, True, 0)
dialog.vbox.pack_start(hbox, False, True, 0)
grid.attach(url, 1, 1, 1, 1)
dialog.vbox.pack_start(grid, True, True, 0)

dialog.add_buttons(_('_Cancel'), Gtk.ResponseType.CANCEL,
_('_OK'), Gtk.ResponseType.OK)
Expand Down

0 comments on commit 57477b3

Please sign in to comment.