diff options
author | dave <drykod@gmail.com> | 2009-10-29 08:01:27 (GMT) |
---|---|---|
committer | dave <drykod@gmail.com> | 2009-10-29 08:01:27 (GMT) |
commit | 5187c8aa64d67c7752f815789c0e290239506218 (patch) | |
tree | 217987f1f32ccef9d23b03d8eb926c84e7f5556e | |
parent | f6f63108831800d0a4b38680f90d05377607d99a (diff) |
bubble message with image
-rw-r--r-- | tutorius/overlayer.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tutorius/overlayer.py b/tutorius/overlayer.py index 3250598..8032ddf 100644 --- a/tutorius/overlayer.py +++ b/tutorius/overlayer.py @@ -423,7 +423,7 @@ class TextBubbleWImg(gtk.Widget): self.speaker = speaker self.tailpos = tailpos self.line_width = 5 - self.padding = 20 + self.padding = 50 self._no_expose = False self.__exposer = None @@ -488,7 +488,7 @@ class TextBubbleWImg(gtk.Widget): text_size = self._text_layout.get_pixel_size() pangoctx.move_to( int((self.allocation.width-text_size[0])/2), - int((self.allocation.height-text_size[1])/2)) + int(self.line_width)) pangoctx.show_layout(self._text_layout) # image painting @@ -501,7 +501,11 @@ class TextBubbleWImg(gtk.Widget): # create a context to the new surface #ct = cairo.Context(surface) - context.set_source_pixbuf(pixbuf,-50,0) + context.set_source_pixbuf( + pixbuf, + int((self.allocation.width-text_size[0])/2), + int(self.line_width+text_size[1])) + context.paint() # work done. Be kind to next cairo widgets and reset matrix. |