Don't set color for empty Text() widgets

In some cases an empty line is drawn when we use Text("")
for padding lines. Don't associate those padders with a
color attribute.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
This commit is contained in:
Adam Stokes 2015-06-17 19:00:43 -04:00
parent e7d3f76290
commit e9e1ad9199
1 changed files with 2 additions and 3 deletions

View File

@ -30,10 +30,9 @@ class Header(WidgetWrap):
excerpt = "" excerpt = ""
def __init__(self): def __init__(self):
border = Color.frame_header(Text(" "))
title_widget = Padding.push_10(Color.body(Text(self.title))) title_widget = Padding.push_10(Color.body(Text(self.title)))
excerpt_widget = Padding.push_10(Color.body(Text(self.excerpt))) excerpt_widget = Padding.push_10(Color.body(Text(self.excerpt)))
pile = Pile([border, pile = Pile([Text(""),
title_widget, title_widget,
Text(""), Text(""),
excerpt_widget, excerpt_widget,
@ -51,7 +50,7 @@ class Footer(WidgetWrap):
message = "" message = ""
def __init__(self): def __init__(self):
border = Color.frame_footer(Text("")) border = Text("")
message_widget = Padding.push_10(Color.body(Text(self.message))) message_widget = Padding.push_10(Color.body(Text(self.message)))
status = Pile([border, message_widget]) status = Pile([border, message_widget])
super().__init__(status) super().__init__(status)