本文整理匯總了Python中miro.frontends.widgets.gtk.widgetset.Alignment.add方法的典型用法代碼示例。如果您正苦於以下問題:Python Alignment.add方法的具體用法?Python Alignment.add怎麽用?Python Alignment.add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類miro.frontends.widgets.gtk.widgetset.Alignment
的用法示例。
在下文中一共展示了Alignment.add方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _align_center
# 需要導入模塊: from miro.frontends.widgets.gtk.widgetset import Alignment [as 別名]
# 或者: from miro.frontends.widgets.gtk.widgetset.Alignment import add [as 別名]
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
# 需要導入模塊: from miro.frontends.widgets.gtk.widgetset import Alignment [as 別名]
# 或者: from miro.frontends.widgets.gtk.widgetset.Alignment import add [as 別名]
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
# 需要導入模塊: from miro.frontends.widgets.gtk.widgetset import Alignment [as 別名]
# 或者: from miro.frontends.widgets.gtk.widgetset.Alignment import add [as 別名]
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