Source code for tessella.widgets.center

from . import Widget
from .align import Align, PositionalAlignment

[docs] class Center(Align): """ A widget that centers its child. NOTE: This widget takes up all the available space given to it. """ def __init__(self, child: Widget): """ Initializes a new Center object. Args: child (Widget): The child to be aligned. """ super().__init__(PositionalAlignment.CENTER, child)