Skip to content

Commit

Permalink
Accept 'align' attribute in Label widget.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanslenders committed Feb 3, 2022
1 parent 64d870a commit a71de3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions prompt_toolkit/widgets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ def __init__(
width: AnyDimension = None,
dont_extend_height: bool = True,
dont_extend_width: bool = False,
align: Union[WindowAlign, Callable[[], WindowAlign]] = WindowAlign.LEFT,
) -> None:

self.text = text
Expand All @@ -368,6 +369,7 @@ def get_width() -> AnyDimension:
style="class:label " + style,
dont_extend_height=dont_extend_height,
dont_extend_width=dont_extend_width,
align=align,
)

def __pt_container__(self) -> Container:
Expand Down

0 comments on commit a71de3c

Please sign in to comment.