本文整理匯總了Python中miro.frontends.widgets.gtk.widgetset.Alignment類的典型用法代碼示例。如果您正苦於以下問題:Python Alignment類的具體用法?Python Alignment怎麽用?Python Alignment使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Alignment類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _align_center
def _align_center(widget, top_pad=0, bottom_pad=0, left_pad=0, right_pad=0):
"""Align center (horizontally) and pad."""
alignment = Alignment(0.5, 0, 0, 1)
alignment.set_padding(top_pad, bottom_pad, left_pad, right_pad)
alignment.add(widget)
return alignment
示例2: _align_middle
def _align_middle(widget, top_pad=0, bottom_pad=0, left_pad=0, right_pad=0):
"""Align center (vertically) and pad."""
alignment = Alignment(0, 0.5, 0, 0)
alignment.set_padding(top_pad, bottom_pad, left_pad, right_pad)
alignment.add(widget)
return alignment
示例3: _align_right
def _align_right(widget, top_pad=0, bottom_pad=0, left_pad=0, right_pad=0):
"""Align right and pad."""
alignment = Alignment(1, 0, 0, 1)
alignment.set_padding(top_pad, bottom_pad, left_pad, right_pad)
alignment.add(widget)
return alignment