mirror of
https://github.com/ihabunek/toot.git
synced 2024-11-03 04:17:21 -05:00
Left justify author header when image support is disabled
This commit is contained in:
parent
d1beec7935
commit
9610f76926
@ -421,8 +421,6 @@ class StatusDetails(urwid.Pile):
|
|||||||
|
|
||||||
if avatar_url and image_support_enabled():
|
if avatar_url and image_support_enabled():
|
||||||
aimg = self.image_widget(avatar_url, 2)
|
aimg = self.image_widget(avatar_url, 2)
|
||||||
else:
|
|
||||||
aimg = urwid.BoxAdapter(urwid.SolidFill(fill_char=" "), 2)
|
|
||||||
|
|
||||||
account_color = ("highlight" if self.status.original.author.account in
|
account_color = ("highlight" if self.status.original.author.account in
|
||||||
self.timeline.tui.followed_accounts else "account")
|
self.timeline.tui.followed_accounts else "account")
|
||||||
@ -430,7 +428,11 @@ class StatusDetails(urwid.Pile):
|
|||||||
atxt = urwid.Pile([("pack", urwid.Text(("bold", self.status.original.author.display_name))),
|
atxt = urwid.Pile([("pack", urwid.Text(("bold", self.status.original.author.display_name))),
|
||||||
("pack", urwid.Text((account_color, self.status.original.author.account)))])
|
("pack", urwid.Text((account_color, self.status.original.author.account)))])
|
||||||
|
|
||||||
|
if image_support_enabled():
|
||||||
columns = urwid.Columns([aimg, ("weight", 9999, atxt)], dividechars=1, min_width=5)
|
columns = urwid.Columns([aimg, ("weight", 9999, atxt)], dividechars=1, min_width=5)
|
||||||
|
else:
|
||||||
|
columns = urwid.Columns([("weight", 9999, atxt)], dividechars=1, min_width=5)
|
||||||
|
|
||||||
return columns
|
return columns
|
||||||
|
|
||||||
def content_generator(self, status, reblogged_by):
|
def content_generator(self, status, reblogged_by):
|
||||||
|
Loading…
Reference in New Issue
Block a user