Ik zit met een klein probleem. Elke keer als er een update is van Openpli moet ik Easy Media aanpassen Font grote en Regel afstand. Is dit op een of ander manier vast te leggen in de skin?
Het gaat om deze 2 regels die rood gekleurd zijn.Ik geef het voorbeeld weer in origineel en in aangepast.
Origineel:
def MPanelEntryComponent(key, text, cell):
res = [ text ]
res.append((eListboxPythonMultiContent.TYPE_TEXT, 150, 17, 300, 60, 0, RT_HALIGN_LEFT, text[0]))
if cell<5:
bpng = LoadPixmap('/usr/lib/enigma2/python/Plugins/Extensions/EasyMedia/key-' + str(cell) + ".png")
if bpng is not None:
res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 0, 5, 5, 50, bpng))
png = LoadPixmap(EasyMedia.EMiconspath + key + '.png')
if png is not None:
res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 25, 5, 100, 50, png))
else:
png = LoadPixmap(EasyMedia.EMiconspath + 'default.png')
if png is not None:
res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 25, 5, 100, 50, png))
return res
class MPanelList(MenuList):
def __init__(self, list, selection = 0, enableWrapAround=True):
MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
self.l.setFont(0, gFont("Regular", 20))
self.l.setItemHeight(60)
self.selection = selection
def postWidgetCreate(self, instance):
MenuList.postWidgetCreate(self, instance)
self.moveToIndex(self.selection)
Aangepast:
def MPanelEntryComponent(key, text, cell):
res = [ text ]
res.append((eListboxPythonMultiContent.TYPE_TEXT, 150, 17,450, 60, 0, RT_HALIGN_LEFT, text[0]))
if cell<5:
bpng = LoadPixmap('/usr/lib/enigma2/python/Plugins/Extensions/EasyMedia/key-' + str(cell) + ".png")
if bpng is not None:
res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 0, 5, 5, 50, bpng))
png = LoadPixmap(EasyMedia.EMiconspath + key + '.png')
if png is not None:
res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 25, 5, 100, 50, png))
else:
png = LoadPixmap(EasyMedia.EMiconspath + 'default.png')
if png is not None:
res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 25, 5, 100, 50, png))
return res
class MPanelList(MenuList):
def __init__(self, list, selection = 0, enableWrapAround=True):
MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
self.l.setFont(0, gFont("Regular", 32))
self.l.setItemHeight(70)
self.selection = selection
def postWidgetCreate(self, instance):
MenuList.postWidgetCreate(self, instance)
self.moveToIndex(self.selection)