Tidy up Addon Manager project editor dialog
Set entry widgets to expand, align labels and adjust margins and spacing.
This commit is contained in:
parent
d443017375
commit
57477b3da8
@ -687,25 +687,29 @@ class AddonManager(ManagedWindow):
|
|||||||
title = _('New Project')
|
title = _('New Project')
|
||||||
else:
|
else:
|
||||||
title = _('Edit Project')
|
title = _('Edit Project')
|
||||||
dialog = Gtk.Dialog(title=title,
|
dialog = Gtk.Dialog(title=title, transient_for=self.window)
|
||||||
transient_for=self.window)
|
dialog.set_border_width(6)
|
||||||
dialog.set_border_width(12)
|
dialog.vbox.set_spacing(6)
|
||||||
dialog.vbox.set_spacing(10)
|
|
||||||
hbox = Gtk.Box()
|
grid = Gtk.Grid()
|
||||||
|
grid.set_row_spacing(6)
|
||||||
|
grid.set_column_spacing(6)
|
||||||
label = Gtk.Label(label=_("%s: ") % _('Project name'))
|
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 = Gtk.Entry()
|
||||||
|
name.set_hexpand(True)
|
||||||
name.set_text(row.project[0])
|
name.set_text(row.project[0])
|
||||||
name.set_activates_default(True)
|
name.set_activates_default(True)
|
||||||
hbox.pack_start(name, False, True, 0)
|
grid.attach(name, 1, 0, 1, 1)
|
||||||
dialog.vbox.pack_start(hbox, False, True, 0)
|
|
||||||
hbox = Gtk.Box()
|
|
||||||
label = Gtk.Label(label=_("%s: ") % _('Url'))
|
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 = Gtk.Entry()
|
||||||
|
url.set_hexpand(True)
|
||||||
url.set_text(row.project[1])
|
url.set_text(row.project[1])
|
||||||
hbox.pack_start(url, False, True, 0)
|
grid.attach(url, 1, 1, 1, 1)
|
||||||
dialog.vbox.pack_start(hbox, False, True, 0)
|
dialog.vbox.pack_start(grid, True, True, 0)
|
||||||
|
|
||||||
dialog.add_buttons(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
dialog.add_buttons(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
||||||
_('_OK'), Gtk.ResponseType.OK)
|
_('_OK'), Gtk.ResponseType.OK)
|
||||||
|
Loading…
Reference in New Issue
Block a user