X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/01abec53c6856c24666967ee51d25d09fc6b8863..d007f7c3fe25146548e8050757756aa5375de9e9:/lib/python/Components/ParentalControlList.py diff --git a/lib/python/Components/ParentalControlList.py b/lib/python/Components/ParentalControlList.py index 6315963f..db8fd8e2 100644 --- a/lib/python/Components/ParentalControlList.py +++ b/lib/python/Components/ParentalControlList.py @@ -3,27 +3,17 @@ from GUIComponent import * from MenuList import MenuList from Components.ParentalControl import parentalControl -from Tools.Directories import * +from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename -from enigma import * - -RT_HALIGN_LEFT = 0 -RT_HALIGN_RIGHT = 1 -RT_HALIGN_CENTER = 2 -RT_HALIGN_BLOCK = 4 - -RT_VALIGN_TOP = 0 -RT_VALIGN_CENTER = 8 -RT_VALIGN_BOTTOM = 16 +from enigma import loadPNG, eListbox, eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT lockPicture = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "lock-fs8.png")) def ParentalControlEntryComponent(service, name, locked = True): res = [ (service, name, locked) ] - res.append((eListboxPythonMultiContent.TYPE_TEXT, 80, 5, 200, 50, 0, RT_HALIGN_LEFT, name)) + res.append((eListboxPythonMultiContent.TYPE_TEXT, 80, 5, 300, 50, 0, RT_HALIGN_LEFT, name)) if locked: res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 0, 0, 32, 32, lockPicture)) - return res class ParentalControlList(MenuList, HTMLComponent, GUIComponent): @@ -33,6 +23,7 @@ class ParentalControlList(MenuList, HTMLComponent, GUIComponent): self.list = list self.l.setList(list) self.l.setFont(0, gFont("Regular", 20)) + self.l.setItemHeight(32) GUI_WIDGET = eListbox @@ -42,7 +33,6 @@ class ParentalControlList(MenuList, HTMLComponent, GUIComponent): def postWidgetCreate(self, instance): instance.setContent(self.l) - instance.setItemHeight(32) def toggleSelectedLock(self): print "self.l.getCurrentSelection():", self.l.getCurrentSelection()