gu.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:Solfege 作者: RannyeriDev 项目源码 文件源码
def hig_category_vbox(title, spacing=6):
    """
    spacing  the space to put between children. HIG say is should be 6, but
    while packing Gtk.LinkButtons there is too much space between the links
    when packing with 6 pixels. So I added the spacing parameter.
    Return a tuple of two boxes:
    box1 -- a box containing everything including the title. Useful
            if you have to hide a category.
    box2    The box you should pack your stuff in.
    """
    vbox = Gtk.VBox(False, 0)
    vbox.set_spacing(hig.SPACE_SMALL)
    label = Gtk.Label(label='<span weight="bold">%s</span>' % title)
    label.set_use_markup(True)
    label.set_alignment(0.0, 0.0)
    vbox.pack_start(label, False, False, 0)
    hbox = Gtk.Box(False, 0)
    vbox.pack_start(hbox, False, False, 0)
    fill = Gtk.Label(label="    ")
    hbox.pack_start(fill, False, False, 0)
    category_content_vbox = Gtk.VBox(False, 0)
    hbox.pack_start(category_content_vbox, True, True, 0)
    category_content_vbox.set_spacing(spacing)
    vbox.show_all()
    return vbox, category_content_vbox
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号