Use Style.from_colors shortcut

This commit is contained in:
Darren Burns
2022-05-10 09:56:47 +01:00
parent 2425ba260f
commit b5bcc63511

View File

@@ -480,9 +480,8 @@ class Widget(DOMNode):
renderable_text_style = parent_text_style + text_style
if renderable_text_style:
color = text_style.color
bgcolor = text_style.bgcolor
renderable = Styled(renderable, Style(color=color, bgcolor=bgcolor))
style = Style.from_colors(text_style.color, text_style.bgcolor)
renderable = Styled(renderable, style)
renderable = Padding(renderable, styles.padding)