From e7fb05703e2a58c260474ea19c611c0835af7ec3 Mon Sep 17 00:00:00 2001 From: Leonardo Robol Date: Fri, 6 Nov 2009 08:54:31 +0100 Subject: [PATCH] Aggiunta redraw del logo dopo lo stop --- RaiTV/VideoWidget.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/RaiTV/VideoWidget.py b/RaiTV/VideoWidget.py index c14cb7a..de26db3 100644 --- a/RaiTV/VideoWidget.py +++ b/RaiTV/VideoWidget.py @@ -107,6 +107,8 @@ class VideoWidget(gtk.DrawingArea): ## Ci permettiamo di disegnare sopra il filmato ## se e solo se non c'è un filmato che sta andando! :) + print self.playing + if not self.playing: cr = self.window.cairo_create() ## Non facciamo lavoro extra e coloriamo solo ciò @@ -122,6 +124,17 @@ class VideoWidget(gtk.DrawingArea): cr.rectangle(0,0,width,height) cr.fill() + pixbuf = gtk.gdk.pixbuf_new_from_file("ui/rai_logo.png") + x = pixbuf.get_width() + y = pixbuf.get_height() + cr.set_source_pixbuf(pixbuf,max((width-x)/2,0),max((height-y)/2,0)) + + + cr.rectangle(max((width - x)/2,0),max((height-y)/2,0),x,y) + cr.fill() + + return + cr.set_source_rgb(0.5,0,0) st = "RaiTV :)" cr.set_font_size(height/20) @@ -169,6 +182,14 @@ class VideoWidget(gtk.DrawingArea): print " => Ops, l'ho ucciso brutalmente" del self.player + self.repaint() + + def repaint(self): + + width, height = self.window.get_size() + self.queue_draw_area(0,0,width,height) + + def play(self): if self.player is not None: -- 2.1.4