PlayList adapted for FullHD skin
authorims <ims21@users.sourceforge.net>
Mon, 6 Apr 2015 19:40:21 +0000 (21:40 +0200)
committerlittlesat <littlesat99@yahoo.com>
Wed, 8 Apr 2015 05:27:38 +0000 (07:27 +0200)
Signed-off-by: littlesat <littlesat99@yahoo.com>

lib/python/Components/MediaPlayer.py

index f6c6bf1..7b30999 100644 (file)
@@ -6,6 +6,7 @@ from os import path
 from enigma import eListboxPythonMultiContent, RT_VALIGN_CENTER, gFont, eServiceCenter
 
 from Tools.LoadPixmap import LoadPixmap
+import skin
 
 STATE_PLAY = 0
 STATE_PAUSE = 1
@@ -17,8 +18,9 @@ STATE_NONE = 5
 class PlayList(MenuList):
        def __init__(self, enableWrapAround = False):
                MenuList.__init__(self, [], enableWrapAround, eListboxPythonMultiContent)
-               self.l.setFont(0, gFont("Regular", 18))
-               self.l.setItemHeight(23)
+               font = skin.fonts.get("PlayList", ("Regular", 18, 23))
+               self.l.setFont(0, gFont(font[0], font[1]))
+               self.l.setItemHeight(font[2])
                self.currPlaying = -1
                self.oldCurrPlaying = -1
                self.serviceHandler = eServiceCenter.getInstance()
@@ -36,10 +38,12 @@ class PlayList(MenuList):
                text = serviceref.getName()
                if text is "":
                        text = path.split(serviceref.getPath().split('/')[-1])[1]
-               res.append((eListboxPythonMultiContent.TYPE_TEXT,25, 1, 470, 22, 0, RT_VALIGN_CENTER, text))
+               x, y, w, h = skin.parameters.get("PlayListName",(25, 1, 470, 22))
+               res.append((eListboxPythonMultiContent.TYPE_TEXT, x, y, w, h, 0, RT_VALIGN_CENTER, text))
                try:
                        png = self.icons[state]
-                       res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 5, 3, 16, 16, png))
+                       x, y, w, h = skin.parameters.get("PlayListIcon",(5, 3, 16, 16))
+                       res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, x, y, w, h, png))
                except:
                        pass
                return res