buttons.py 文件源码

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

项目:x-mario-center 作者: fossasia 项目源码 文件源码
def do_draw(self, cr):
        cr.save()
        A = self.get_allocation()
        if self._pressed:
            cr.translate(1, 1)

        if self.has_focus():
            Gtk.render_focus(self.get_style_context(),
                             cr,
                             3, 3,
                             A.width - 6, A.height - 6)

        for child in self:
            self.propagate_draw(child, cr)

        if self.is_installed:
            # paint installed tick overlay
            if self.get_direction() != Gtk.TextDirection.RTL:
                x = y = 36
            else:
                x = A.width - 56
                y = 36

            Gdk.cairo_set_source_pixbuf(cr, self._overlay, x, y)
            cr.paint()

        cr.restore()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号