Guest User

Untitled

a guest
Oct 18th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. # This will create the correct cairo surface, but I need to associate it with the button image
  2. # self is a gtk.Button instance
  3. sensitive = (self.state != gtk.STATE_INSENSITIVE)
  4. surface = self._buffer.get_surface(sensitive, self)
  5.  
  6. allocation = self.get_allocation()
  7. if self.window is not None:
  8. cr = self.window.cairo_create()
  9. cr.set_source_surface(surface, allocation.x, allocation.y)
  10. cr.paint()
Add Comment
Please, Sign In to add comment