Help adapted as skineable
authorims <ims21@users.sourceforge.net>
Sun, 18 Jan 2015 17:08:20 +0000 (18:08 +0100)
committerlittlesat <littlesat99@yahoo.com>
Mon, 19 Jan 2015 10:42:55 +0000 (11:42 +0100)
Signed-off-by: littlesat <littlesat99@yahoo.com>

lib/python/Components/HelpMenuList.py

index a7dbda8..b257b34 100644 (file)
@@ -2,6 +2,7 @@ from GUIComponent import GUIComponent
 
 from enigma import eListboxPythonMultiContent, eListbox, gFont
 from Tools.KeyBindings import queryKeyBinding, getKeyDescription
+import skin
 #getKeyPositions
 
 # [ ( actionmap, context, [(action, help), (action, help), ...] ), (actionmap, ... ), ... ]
@@ -47,23 +48,29 @@ class HelpMenuList(GUIComponent):
                                if isinstance(help, list):
                                        self.extendedHelp = True
                                        print "extendedHelpEntry found"
+                                       x, y, w, h = skin.parameters.get("HelpMenuListExtHlp0",(0, 0, 600, 26))
+                                       x1, y1, w1, h1 = skin.parameters.get("HelpMenuListExtHlp1",(0, 28, 600, 20))
                                        entry.extend((
-                                               (eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 600, 26, 0, 0, help[0]),
-                                               (eListboxPythonMultiContent.TYPE_TEXT, 0, 28, 600, 20, 1, 0, help[1])
+                                               (eListboxPythonMultiContent.TYPE_TEXT, x, y, w, h, 0, 0, help[0]),
+                                               (eListboxPythonMultiContent.TYPE_TEXT, x1, y1, w1, h1, 1, 0, help[1])
                                        ))
                                else:
-                                       entry.append( (eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 600, 28, 0, 0, help) )
+                                       x, y, w, h = skin.parameters.get("HelpMenuListHlp",(0, 0, 600, 28))
+                                       entry.append( (eListboxPythonMultiContent.TYPE_TEXT, x, y, w, h, 0, 0, help) )
 
                                l.append(entry)
 
                self.l.setList(l)
                if self.extendedHelp is True:
-                       self.l.setFont(0, gFont("Regular", 24))
-                       self.l.setFont(1, gFont("Regular", 18))
-                       self.l.setItemHeight(50)
+                       font = skin.fonts.get("HelpMenuListExt0", ("Regular", 24, 50))
+                       self.l.setFont(0, gFont(font[0], font[1]))
+                       self.l.setItemHeight(font[2])
+                       font = skin.fonts.get("HelpMenuListExt1", ("Regular", 18))
+                       self.l.setFont(1, gFont(font[0], font[1]))
                else:
-                       self.l.setFont(0, gFont("Regular", 24))
-                       self.l.setItemHeight(38)
+                       font = skin.fonts.get("HelpMenuList", ("Regular", 24, 38))
+                       self.l.setFont(0, gFont(font[0], font[1]))
+                       self.l.setItemHeight(font[2])
 
        def ok(self):
                # a list entry has a "private" tuple as first entry...