diff options
author | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2007-09-25 21:27:50 (GMT) |
---|---|---|
committer | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2007-09-25 21:27:50 (GMT) |
commit | 170145554bee23bd7426d5d77fcd9e06e35cd11f (patch) | |
tree | cf0223a145e75915581b0a8bb01e5c0f1b7ef687 /button.py | |
parent | a1056b994476da1f9120fd8d3ef9188c486d6f26 (diff) |
cairo buttons now gtk ...
git-svn-id: http://mediamods.com/public-svn/camera-activity/Record.activity@528 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'button.py')
-rw-r--r-- | button.py | 45 |
1 files changed, 42 insertions, 3 deletions
@@ -21,13 +21,52 @@ class RecdButton(TrayButton, gobject.GObject): def getImg( self ): - pb = self.ui.thumbVideoSvg.get_pixbuf() img = gtk.Image() - img.set_from_pixbuf( pb ) - img.show() + ipb = self.recd.getThumbPixbuf() + if (self.recd.type == self.ui.ca.m.TYPE_PHOTO): + if (self.tc.recd.buddy): + thumbPhotoSvg = self.ui.loadSvg(self.ui.thumbPhotoSvgData, self.recd.colorStroke.hex, self.recd.colorFill.hex) + pb = thumbPhotoSvg.get_pixbuf() + img.set_from_pixbuf( pb ) + img.show() + ipb.composite(pb, 8, 8, ipb.get_width(), ipb.get_height(), 0, 0, 1, 1, gtk.gdk.INTERP_BILINEAR, 255 ) + else: + pb = self.ui.thumbPhotoSvg.get_pixbuf() + img.set_from_pixbuf( pb ) + img.show() + ipb.composite(pb, 8, 8, ipb.get_width(), ipb.get_height(), 0, 0, 1, 1, gtk.gdk.INTERP_BILINEAR, 255 ) + + if (self.recd.type == self.ui.ca.m.TYPE_VIDEO): + if (self.tc.recd.buddy): + thumbVideoSvg = self.ui.loadSvg(self.ui.thumbVideoSvgData, self.recd.colorStroke.hex, self.recd.colorFill.hex) + pb = thumbVideoSvg.get_pixbuf() + img.set_from_pixbuf( pb ) + img.show() + ipb.composite(pb, 8, 8, ipb.get_width(), ipb.get_height(), 0, 0, 1, 1, gtk.gdk.INTERP_BILINEAR, 255 ) + else: + pb = self.ui.thumbVideoSvg.get_pixbuf() + img.set_from_pixbuf( pb ) + img.show() + ipb.composite(pb, 8, 22, ipb.get_width(), ipb.get_height(), 0, 0, 1, 1, gtk.gdk.INTERP_BILINEAR, 255 ) + + if (self.recd.type == self.ui.ca.m.TYPE_AUDIO): + if (self.tc.recd.buddy): + thumbAudioSvg = self.ui.loadSvg(self.ui.thumbAudioSvgData, self.recd.colorStroke.hex, self.recd.colorFill.hex) + pb = thumbAudioSvg.get_pixbuf() + img.set_from_pixbuf( pb ) + img.show() + ipb.composite(pb, 8, 8, ipb.get_width(), ipb.get_height(), 0, 0, 1, 1, gtk.gdk.INTERP_BILINEAR, 255 ) + else: + pb = self.ui.thumbAudioSvg.get_pixbuf() + img.set_from_pixbuf( pb ) + img.show() + ipb.composite(pb, 8, 22, ipb.get_width(), ipb.get_height(), 0, 0, 1, 1, gtk.gdk.INTERP_BILINEAR, 255 ) + + img.set_from_pixbuf(pb) return img + def setup_rollover_options( self, info ): palette = Palette(info) self.set_palette(palette) |