Skip to content
Snippets Groups Projects
Commit b735407c authored by Johann Jacobsohn's avatar Johann Jacobsohn
Browse files

make paper list stretch vertically

parent 0cd9f456
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,9 @@ class Mattermost:
class Papersurfer:
"""Provide UI and interface with mattermost class."""
def __init__(self, username, password):
self._screen = urwid.raw_display.Screen()
self.size = self._screen.get_cols_rows()
palette = [('I say', 'default,bold', 'default', 'bold')]
ask = urwid.Edit(('I say', u"Filter?\n"))
exitbutton = urwid.Button(u'Exit')
......@@ -71,7 +74,8 @@ class Papersurfer:
body.append(urwid.AttrMap(button, None, focus_map='reversed'))
self.listcontent = urwid.SimpleFocusListWalker(body)
paperlist = urwid.BoxAdapter(urwid.ListBox(self.listcontent), 40)
paperlist = urwid.BoxAdapter(urwid.ListBox(self.listcontent),
self.size[1] - 5)
pile = urwid.Pile([ask, div, paperlist, div, exitbutton])
top = urwid.Filler(pile, valign='middle')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment