controller_widget.py 文件源码

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

项目:sc-controller 作者: kozec 项目源码 文件源码
def __init__(self, app, name, use_icon, widget):
        self.pressed = Gtk.Label()
        ControllerWidget.__init__(self, app, name, use_icon, widget)

        grid = Gtk.Grid()
        self.label.set_property("vexpand", True)
        self.label.set_property("hexpand", True)
        self.label.set_xalign(0.0); self.label.set_yalign(0.5)
        self.pressed.set_property("hexpand", True)
        self.pressed.set_xalign(0.0); self.pressed.set_yalign(1.0)
        if self.icon:
            self.icon.set_margin_right(5)
        grid.attach(self.icon, 1, 1, 1, 2)
        grid.attach(self.label, 2, 1, 1, 1)
        grid.attach(self.pressed, 2, 2, 1, 1)
        self.over_icon = False
        self.widget.add(grid)
        self.widget.show_all()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号