docstring

This commit is contained in:
Will McGugan
2021-08-17 21:32:38 +01:00
parent fb141ed6c9
commit 33ba899b0f

View File

@@ -115,6 +115,11 @@ class Widget(MessagePump):
watch(self, attribute_name, callback)
def render_styled(self) -> RenderableType:
"""Applies style attributes to the default renderable.
Returns:
RenderableType: A new renderable.
"""
renderable = self.render()
if self.style_padding is not None:
renderable = Padding(renderable, self.style_padding)