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()
评论列表
文章目录