Only apply justify CSS if Text object has no justify set

This commit is contained in:
Darren Burns
2022-08-25 17:13:49 +01:00
parent e8a2892e0e
commit 27c07dc7f0

View File

@@ -987,7 +987,8 @@ class Widget(DOMNode):
rich_style = self.rich_style
if isinstance(renderable, Text):
renderable.stylize(rich_style)
renderable.justify = self.styles.text_justify
if not renderable.justify:
renderable.justify = self.styles.text_justify
else:
renderable = Styled(renderable, rich_style)