Btw, the logos seem somewhat vague (white is grey). Is it my TV or did I forgot to disable some sort of alpha blending?
Greets, Eric
--- tvlisting_area.py 19 Dec 2004 16:41:12 -0000 1.20
+++ tvlisting_area.py 21 Dec 2004 20:59:31 -0000
@@ -41,6 +41,7 @@
import copy
import os
import pyepg
+import gui
import time
import config
@@ -342,23 +343,16 @@
logo_geo =[ tx0+r.x+r.size, ty0+r.y+r.size, r.width-2*r.size,
r.height-2*r.size ]
-
- channel_logo = None
-
- # FIXME: there is no self.loadimage anymore
- # channel_logo = config.TV_LOGOS + '/' + channel.id + '.png'
- # if os.path.isfile(channel_logo):
- # channel_logo = self.loadimage(channel_logo, \
- # (r.width+1-2*r.size,
- # item_h-2*r.size))
- # if channel_logo:
- # self.objects.append(self.drawimage(channel_logo, \
- # (logo_geo[0], logo_geo[1])))
-
- self.objects.append(self.drawstring(channel.name, label_val.font,
- content, x=tx0, y=ty0,
- width=r.width+2*r.x,
- height=item_h))
+ channel_logo = config.TV_LOGOS + '/' + channel.id + '.png'
+ if os.path.isfile(channel_logo):
+ img = gui.imagelib.load(channel_logo, (None, None))
+ i = self.drawimage(img, (logo_geo[0], logo_geo[1]))
+ self.objects.append(i)
+ else:
+ self.objects.append(self.drawstring(channel.name,
label_val.font,
+ content, x=tx0, y=ty0,
+ width=r.width+2*r.x,
+ height=item_h))
self.objects.append(self.drawbox(tx0 + r.x, ty0 + r.y,
r.width+1, item_h, r))
