Primitivus: buttons are now in the bottom of Dialogs
This commit is contained in:
parent
7c5904d830
commit
c95e2aeea3
1 changed files with 1 additions and 2 deletions
|
|
@ -661,10 +661,9 @@ class GenericDialog(urwid.WidgetWrap):
|
|||
buttons = [urwid.Button(_("Ok"), kwargs['ok_cb'], kwargs['ok_value'])]
|
||||
if buttons:
|
||||
buttons_flow = urwid.GridFlow(buttons, max([len(button.get_label()) for button in buttons])+4, 1, 1, 'center')
|
||||
widgets_lst.append(buttons_flow)
|
||||
body_content = urwid.SimpleListWalker(widgets_lst)
|
||||
frame_body = urwid.ListBox(body_content)
|
||||
frame = urwid.Frame(frame_body, frame_header)
|
||||
frame = urwid.Frame(frame_body, frame_header, buttons_flow if buttons else None)
|
||||
decorated_frame = urwid.LineBox(frame)
|
||||
urwid.WidgetWrap.__init__(self, decorated_frame)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue