Skip to content

Commit

Permalink
boxes: Pack recipient headers to ensure they are displayed.
Browse files Browse the repository at this point in the history
This commit allows recipient headers to wrap onto multiple lines, rather
than being a fixed width, which previously caused them to not be
rendered in narrow windows.

This at least shows the recipient header if they are long, however the
styling could be improved. A custom urwid widget may be necessary to
improve further.

Fixes #671.
  • Loading branch information
neiljp committed May 26, 2020
1 parent edfdb7e commit 6ab45cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zulipterminal/ui_tools/boxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def stream_header(self) -> Any:
])
stream_title = urwid.Text(stream_title_markup)
header = urwid.Columns([
(len(stream_title.text), stream_title),
('pack', stream_title),
urwid.AttrWrap(urwid.Divider('━'), color),
])
header.markup = stream_title_markup
Expand All @@ -304,7 +304,7 @@ def private_header(self) -> Any:
])
title = urwid.Text(title_markup)
header = urwid.Columns([
(len(title.text), title),
('pack', title),
(1, urwid.Text(' ')),
urwid.AttrWrap(urwid.Divider('━'), 'general_bar'),
])
Expand Down

0 comments on commit 6ab45cc

Please sign in to comment.