Mercurial > urwid-satext
diff frontends/primitivus/custom_widgets.py @ 20:333a62fab0e3
Primitivus: buttons are now in the bottom of Dialogs
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 12 Aug 2010 13:18:11 +0800 |
parents | 0b83dd2b15d1 |
children | 96a2c5904e35 |
line wrap: on
line diff
--- a/frontends/primitivus/custom_widgets.py Mon Aug 09 21:58:28 2010 +0800 +++ b/frontends/primitivus/custom_widgets.py Thu Aug 12 13:18:11 2010 +0800 @@ -661,10 +661,9 @@ 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)