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:
parent
e7d3f76290
commit
e9e1ad9199
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue