本文整理汇总了Python中skin.parseFont函数的典型用法代码示例。如果您正苦于以下问题:Python parseFont函数的具体用法?Python parseFont怎么用?Python parseFont使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了parseFont函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: initList
def initList(self):
size = self.params['size']
tabsize = self.tab_params['size']
space_width = self.params['spaceWidth']
space_height = self.params['spaceHeight']
entries_per_col = size[1] / (tabsize[1] + space_height)
if (entries_per_col + 1) * (tabsize[1] + space_height) - space_height <= size[1]:
entries_per_col += 1
assert entries_per_col > 0
entries_per_row = size[0] / (tabsize[0] + space_width)
if (entries_per_row + 1) * (tabsize[0] + space_width) - space_width <= size[0]:
entries_per_row += 1
num_rows = len(self.tabs) / entries_per_row + 1
num_pages = num_rows / entries_per_col + 1
print "entries_per_row = %d, rows = %d, num_pages = %d"%(entries_per_row, num_rows, num_pages)
self.entries_per_row = entries_per_row
self.entries_per_page = entries_per_col * entries_per_row
self.pages = [self.tabs[i:i+self.entries_per_page] for i in range(0, len(self.tabs), self.entries_per_page)]
scale = ((1,1),(1,1))
self.l.setFont(0, parseFont(self.tab_params['fontActive'], scale))
self.l.setFont(1, parseFont(self.tab_params['fontInactive'], scale))
self.l.setItemHeight(tabsize[1]+ self.params['spaceHeight'])
self.buildTabPage(self.pages[0])
self.setActiveTab(0)
self.instance.setContent(self.l)
开发者ID:mx3L,项目名称:archivczsk,代码行数:29,代码来源:common.py
示例2: applySkin
def applySkin(self, desktop, parent):
attribs = [ ]
if self.skinAttributes is not None:
attribs = [ ]
for (attrib, value) in self.skinAttributes:
if attrib == "foregroundColorMarked":
self.l.setColor(eListboxServiceContent.markedForeground, parseColor(value))
elif attrib == "foregroundColorMarkedSelected":
self.l.setColor(eListboxServiceContent.markedForegroundSelected, parseColor(value))
elif attrib == "backgroundColorMarked":
self.l.setColor(eListboxServiceContent.markedBackground, parseColor(value))
elif attrib == "backgroundColorMarkedSelected":
self.l.setColor(eListboxServiceContent.markedBackgroundSelected, parseColor(value))
elif attrib == "foregroundColorServiceNotAvail":
self.l.setColor(eListboxServiceContent.serviceNotAvail, parseColor(value))
elif attrib == "serviceItemHeight":
self.ItemHeight = int(value)
elif attrib == "serviceNameFont":
self.ServiceNameFont = parseFont(value, ((1,1),(1,1)))
elif attrib == "serviceInfoFont":
self.ServiceInfoFont = parseFont(value, ((1,1),(1,1)))
elif attrib == "serviceNumberFont":
self.ServiceNumberFont = parseFont(value, ((1,1),(1,1)))
else:
attribs.append((attrib, value))
self.skinAttributes = attribs
return GUIComponent.applySkin(self, desktop, parent)
开发者ID:kakunbsc,项目名称:enigma2.2,代码行数:27,代码来源:ServiceList.py
示例3: applySkin
def applySkin(self, desktop, parent):
attribs = []
if self.skinAttributes is not None:
attribs = []
for (attrib, value) in self.skinAttributes:
if attrib == "foregroundColorMarked":
self.l.setColor(eListboxServiceContent.markedForeground, parseColor(value))
elif attrib == "foregroundColorMarkedSelected":
self.l.setColor(eListboxServiceContent.markedForegroundSelected, parseColor(value))
elif attrib == "backgroundColorMarked":
self.l.setColor(eListboxServiceContent.markedBackground, parseColor(value))
elif attrib == "backgroundColorMarkedSelected":
self.l.setColor(eListboxServiceContent.markedBackgroundSelected, parseColor(value))
elif attrib == "foregroundColorServiceNotAvail":
self.l.setColor(eListboxServiceContent.serviceNotAvail, parseColor(value))
elif attrib == "foregroundColorEvent" or attrib == "colorServiceDescription":
self.l.setColor(eListboxServiceContent.eventForeground, parseColor(value))
elif attrib == "foregroundColorEventSelected" or attrib == "colorServiceDescriptionSelected":
self.l.setColor(eListboxServiceContent.eventForegroundSelected, parseColor(value))
elif attrib == "foregroundColorEventborder":
self.l.setColor(eListboxServiceContent.eventborderForeground, parseColor(value))
elif attrib == "foregroundColorEventborderSelected":
self.l.setColor(eListboxServiceContent.eventborderForegroundSelected, parseColor(value))
elif attrib == "colorEventProgressbar":
self.l.setColor(eListboxServiceContent.serviceEventProgressbarColor, parseColor(value))
elif attrib == "colorEventProgressbarSelected":
self.l.setColor(eListboxServiceContent.serviceEventProgressbarColorSelected, parseColor(value))
elif attrib == "colorEventProgressbarBorder":
self.l.setColor(eListboxServiceContent.serviceEventProgressbarBorderColor, parseColor(value))
elif attrib == "colorEventProgressbarBorderSelected":
self.l.setColor(
eListboxServiceContent.serviceEventProgressbarBorderColorSelected, parseColor(value)
)
elif attrib == "picServiceEventProgressbar":
pic = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, value))
if pic:
self.l.setPixmap(self.l.picServiceEventProgressbar, pic)
elif attrib == "serviceItemHeight":
self.ItemHeight = int(value)
elif attrib == "serviceNameFont":
font = parseFont(value, ((1, 1), (1, 1)))
self.ServiceNameFontName = font.family
self.ServiceNameFontSize = font.pointSize
elif attrib == "serviceInfoFont":
font = parseFont(value, ((1, 1), (1, 1)))
self.ServiceInfoFontName = font.family
self.ServiceInfoFontSize = font.pointSize
elif attrib == "serviceNumberFont":
font = parseFont(value, ((1, 1), (1, 1)))
self.ServiceNumberFontName = font.family
self.ServiceNumberFontSize = font.pointSize
else:
attribs.append((attrib, value))
self.skinAttributes = attribs
self.setServiceFontsize()
rc = GUIComponent.applySkin(self, desktop, parent)
self.listHeight = self.instance.size().height()
self.listWidth = self.instance.size().width()
self.setItemsPerPage()
return rc
开发者ID:Tron3,项目名称:enigma2,代码行数:60,代码来源:ServiceList.py
示例4: __init__
def __init__(self, serviceList):
self.serviceList = serviceList
GUIComponent.__init__(self)
self.l = eListboxServiceContent()
pic = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/folder.png"))
pic and self.l.setPixmap(self.l.picFolder, pic)
pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/marker.png"))
pic and self.l.setPixmap(self.l.picMarker, pic)
pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/ico_dvb_s.png"))
pic and self.l.setPixmap(self.l.picDVB_S, pic)
pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/ico_dvb_c.png"))
pic and self.l.setPixmap(self.l.picDVB_C, pic)
pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/ico_dvb_t.png"))
pic and self.l.setPixmap(self.l.picDVB_T, pic)
pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/ico_stream.png"))
pic and self.l.setPixmap(self.l.picStream, pic)
pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/ico_service_group.png"))
pic and self.l.setPixmap(self.l.picServiceGroup, pic)
pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/icon_crypt.png"))
pic and self.l.setPixmap(self.l.picCrypto, pic)
pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/record.png"))
pic and self.l.setPixmap(self.l.picRecord, pic)
self.root = None
self.mode = self.MODE_NORMAL
self.ItemHeight = 28
self.ServiceNameFont = parseFont("Regular;22", ((1,1),(1,1)))
self.ServiceInfoFont = parseFont("Regular;18", ((1,1),(1,1)))
self.ServiceNumberFont = parseFont("Regular;20", ((1,1),(1,1)))
self.progressBarWidth = 52
self.progressPercentWidth = 0
self.fieldMargins = 10
self.onSelectionChanged = [ ]
开发者ID:kingvuplus,项目名称:stbgui,代码行数:35,代码来源:ServiceList.py
示例5: __init__
def __init__(self, enableWrapAround = True):
GUIComponent.__init__(self)
self.screenwidth = getDesktop(0).size().width()
if self.screenwidth and self.screenwidth == 1920:
self.posFont = parseFont("Regular;30", ((1,1),(1,1)))
self.nameFont = parseFont("Regular;30", ((1,1),(1,1)))
self.itemHeight = 40
else:
self.posFont = parseFont("Regular;20", ((1,1),(1,1)))
self.nameFont = parseFont("Regular;20", ((1,1),(1,1)))
self.itemHeight = 30
self.posColor = 0xFFFFFF
self.posColorSel = 0xFFFFFF
self.nameColor = 0xFFFFFF
self.nameColorSel = 0xFFFFFF
self.posWidth = -1
self.nameWidth = -1
self.l = eListboxPythonMultiContent()
self.l.setFont(0, self.posFont)
self.l.setFont(1, self.nameFont)
self.onSelectionChanged = []
开发者ID:MCelliotG,项目名称:e2openplugin-EnhancedMovieCenter,代码行数:26,代码来源:EMCPlayList.py
示例6: applySkin
def applySkin(self, desktop, parent):
attribs = []
if self.skinAttributes is not None:
for (attrib, value) in self.skinAttributes:
if attrib == "posFont":
self.posFont = parseFont(value, ((1,1),(1,1)))
self.l.setFont(0, self.posFont)
elif attrib == "nameFont":
self.nameFont = parseFont(value, ((1,1),(1,1)))
self.l.setFont(1, self.nameFont)
elif attrib == "posWidth":
self.posWidth = int(value)
elif attrib == "nameWidth":
self.nameWidth = int(value)
elif attrib == "posColor":
self.posColor = parseColor(value).argb()
elif attrib == "posColorSel":
self.posColorSel = parseColor(value).argb()
elif attrib == "nameColor":
self.nameColor = parseColor(value).argb()
elif attrib == "nameColorSel":
self.nameColorSel = parseColor(value).argb()
elif attrib == "itemHeight":
self.itemHeight = int(value)
else:
attribs.append((attrib, value))
self.readPlaylist()
self.refreshList()
self.setItemHeight()
self.skinAttributes = attribs
return GUIComponent.applySkin(self, desktop, parent)
开发者ID:MCelliotG,项目名称:e2openplugin-EnhancedMovieCenter,代码行数:31,代码来源:EMCPlayList.py
示例7: __init__
def __init__(self):
GUIComponent.__init__(self)
self.l = eListboxServiceContent()
pic = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/folder.png"))
if pic:
self.l.setPixmap(self.l.picFolder, pic)
pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/marker.png"))
if pic:
self.l.setPixmap(self.l.picMarker, pic)
pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_dvb_s-fs8.png"))
if pic:
self.l.setPixmap(self.l.picDVB_S, pic)
pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_dvb_c-fs8.png"))
if pic:
self.l.setPixmap(self.l.picDVB_C, pic)
pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_dvb_t-fs8.png"))
if pic:
self.l.setPixmap(self.l.picDVB_T, pic)
pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_service_group-fs8.png"))
if pic:
self.l.setPixmap(self.l.picServiceGroup, pic)
self.root = None
self.mode = self.MODE_NORMAL
self.ItemHeight = 28
self.ServiceNameFont = parseFont("Regular;22", ((1,1),(1,1)))
self.ServiceInfoFont = parseFont("Regular;18", ((1,1),(1,1)))
self.ServiceNumberFont = parseFont("Regular;20", ((1,1),(1,1)))
self.onSelectionChanged = [ ]
开发者ID:fairbird,项目名称:Blackhole-OpenPLI,代码行数:35,代码来源:ServiceList.py
示例8: applySkin
def applySkin(self, desktop, screen):
if self.skinAttributes is not None:
attribs = [ ]
for (attrib, value) in self.skinAttributes:
if attrib == "EntryForegroundColor":
self.foreColor = parseColor(value).argb()
elif attrib == "EntryForegroundColorSelected":
self.foreColorSelected = parseColor(value).argb()
elif attrib == "EntryBackgroundColor":
self.backColor = parseColor(value).argb()
elif attrib == "EntryBackgroundColorSelected":
self.backColorSelected = parseColor(value).argb()
elif attrib == "EntryBorderColor":
self.borderColor = parseColor(value).argb()
elif attrib == "EntryFont":
font = parseFont(value, ((1,1),(1,1)) )
self.entryFontName = font.family
self.entryFontSize = font.pointSize
elif attrib == "ServiceForegroundColor" or attrib == "ServiceNameForegroundColor":
self.foreColorService = parseColor(value).argb()
elif attrib == "ServiceForegroundColorSelected":
self.foreColorServiceSelected = parseColor(value).argb()
elif attrib == "ServiceBackgroundColor" or attrib == "ServiceNameBackgroundColor":
self.backColorService = parseColor(value).argb()
elif attrib == "ServiceBackgroundColorSelected":
self.backColorServiceSelected = parseColor(value).argb()
elif attrib == "ServiceBackgroundColorRecording" or attrib == "ServiceNameBackgroundColor":
self.backColorRec = parseColor(value).argb()
elif attrib == "ServiceForegroundColorRecording":
self.foreColorRec = parseColor(value).argb()
elif attrib == "ServiceBorderColor":
self.borderColorService = parseColor(value).argb()
elif attrib == "ServiceFont":
self.serviceFont = parseFont(value, ((1,1),(1,1)) )
elif attrib == "EntryBackgroundColorNow":
self.backColorNow = parseColor(value).argb()
elif attrib == "EntryForegroundColorNow":
self.foreColorNow = parseColor(value).argb()
elif attrib == "ServiceBorderWidth":
self.serviceBorderWidth = int(value)
elif attrib == "ServiceNamePadding":
self.serviceNamePadding = int(value)
elif attrib == "EventBorderWidth":
self.eventBorderWidth = int(value)
elif attrib == "EventNamePadding":
self.eventNamePadding = int(value)
else:
attribs.append((attrib,value))
self.skinAttributes = attribs
self.l.setFont(0, self.serviceFont)
self.setEventFontsize()
rc = GUIComponent.applySkin(self, desktop, screen)
# now we know our size and can safely set items per page
self.listHeight = self.instance.size().height()
self.listWidth = self.instance.size().width()
self.setItemsPerPage()
return rc
开发者ID:eesatfan,项目名称:openpli-enigma2,代码行数:57,代码来源:GraphMultiEpg.py
示例9: applySkin
def applySkin(self, desktop, parent):
attribs = [ ]
if self.skinAttributes is not None:
attribs = [ ]
for (attrib, value) in self.skinAttributes:
if attrib == "foregroundColorMarked":
self.l.setColor(eListboxServiceContent.markedForeground, parseColor(value))
elif attrib == "foregroundColorMarkedSelected":
self.l.setColor(eListboxServiceContent.markedForegroundSelected, parseColor(value))
elif attrib == "backgroundColorMarked":
self.l.setColor(eListboxServiceContent.markedBackground, parseColor(value))
elif attrib == "backgroundColorMarkedSelected":
self.l.setColor(eListboxServiceContent.markedBackgroundSelected, parseColor(value))
elif attrib == "foregroundColorServiceNotAvail":
self.l.setColor(eListboxServiceContent.serviceNotAvail, parseColor(value))
elif attrib == "colorEventProgressbar":
self.l.setColor(eListboxServiceContent.serviceEventProgressbarColor, parseColor(value))
elif attrib == "colorEventProgressbarSelected":
self.l.setColor(eListboxServiceContent.serviceEventProgressbarColorSelected, parseColor(value))
elif attrib == "colorEventProgressbarBorder":
self.l.setColor(eListboxServiceContent.serviceEventProgressbarBorderColor, parseColor(value))
elif attrib == "colorEventProgressbarBorderSelected":
self.l.setColor(eListboxServiceContent.serviceEventProgressbarBorderColorSelected, parseColor(value))
elif attrib == "colorServiceDescription":
self.l.setColor(eListboxServiceContent.serviceDescriptionColor, parseColor(value))
elif attrib == "colorServiceDescriptionSelected":
self.l.setColor(eListboxServiceContent.serviceDescriptionColorSelected, parseColor(value))
elif attrib == "colorServiceRecording":
self.l.setColor(eListboxServiceContent.serviceRecordingColor, parseColor(value))
elif attrib == "picServiceEventProgressbar":
pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, value))
if pic:
self.l.setPixmap(self.l.picServiceEventProgressbar, pic)
elif attrib == "serviceItemHeight":
if self.picon_width == 0:
self.ItemHeight = int(value)
else:
if self.ItemHeight < int(value):
self.ItemHeight = int(value)
if config.usage.servicelist_two_lines.value and self.ItemHeight < self.min_two_line_height:
self.ItemHeight = self.min_two_line_height
elif attrib == "serviceNameFont":
self.ServiceNameFont = parseFont(value, ((1,1),(1,1)))
elif attrib == "serviceInfoFont":
self.ServiceInfoFont = parseFont(value, ((1,1),(1,1)))
elif attrib == "serviceNumberFont":
self.ServiceNumberFont = parseFont(value, ((1,1),(1,1)))
elif attrib == "progressbarHeight":
self.l.setProgressbarHeight(int(value))
elif attrib == "progressbarBorderWidth":
self.l.setProgressbarBorderWidth(int(value))
else:
attribs.append((attrib, value))
self.skinAttributes = attribs
return GUIComponent.applySkin(self, desktop, parent)
开发者ID:kingvuplus,项目名称:test2,代码行数:55,代码来源:ServiceList.py
示例10: applySkin
def applySkin(self, desktop, parent):
attribs = []
if self.skinAttributes is not None:
attribs = []
for (attrib, value) in self.skinAttributes:
if attrib == "foregroundColorMarked":
self.l.setColor(eListboxServiceContent.markedForeground, parseColor(value))
elif attrib == "foregroundColorMarkedSelected":
self.l.setColor(eListboxServiceContent.markedForegroundSelected, parseColor(value))
elif attrib == "backgroundColorMarked":
self.l.setColor(eListboxServiceContent.markedBackground, parseColor(value))
elif attrib == "backgroundColorMarkedSelected":
self.l.setColor(eListboxServiceContent.markedBackgroundSelected, parseColor(value))
elif attrib == "foregroundColorServiceNotAvail":
self.l.setColor(eListboxServiceContent.serviceNotAvail, parseColor(value))
elif attrib == "foregroundColorEvent" or attrib == "colorServiceDescription":
self.l.setColor(eListboxServiceContent.eventForeground, parseColor(value))
elif attrib == "foregroundColorEventSelected" or attrib == "colorServiceDescriptionSelected":
self.l.setColor(eListboxServiceContent.eventForegroundSelected, parseColor(value))
elif attrib == "foregroundColorEventborder":
self.l.setColor(eListboxServiceContent.eventborderForeground, parseColor(value))
elif attrib == "foregroundColorEventborderSelected":
self.l.setColor(eListboxServiceContent.eventborderForegroundSelected, parseColor(value))
elif attrib == "colorEventProgressbar":
self.l.setColor(eListboxServiceContent.serviceEventProgressbarColor, parseColor(value))
elif attrib == "colorEventProgressbarSelected":
self.l.setColor(eListboxServiceContent.serviceEventProgressbarColorSelected, parseColor(value))
elif attrib == "colorEventProgressbarBorder":
self.l.setColor(eListboxServiceContent.serviceEventProgressbarBorderColor, parseColor(value))
elif attrib == "colorEventProgressbarBorderSelected":
self.l.setColor(
eListboxServiceContent.serviceEventProgressbarBorderColorSelected, parseColor(value)
)
elif attrib == "picServiceEventProgressbar":
pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, value))
if pic:
self.l.setPixmap(self.l.picServiceEventProgressbar, pic)
elif attrib == "serviceItemHeight":
self.ItemHeight = int(value)
elif attrib == "serviceNameFont":
self.ServiceNameFont = parseFont(value, ((1, 1), (1, 1)))
elif attrib == "serviceInfoFont":
self.ServiceInfoFont = parseFont(value, ((1, 1), (1, 1)))
elif attrib == "serviceNumberFont":
self.ServiceNumberFont = parseFont(value, ((1, 1), (1, 1)))
else:
attribs.append((attrib, value))
self.skinAttributes = attribs
return GUIComponent.applySkin(self, desktop, parent)
开发者ID:alg810,项目名称:open-duckbox-project-sh4-pingulux-git,代码行数:49,代码来源:ServiceList.py
示例11: applySkin
def applySkin(self, desktop, parent):
attribs = [ ]
if self.skinAttributes is not None:
for (attrib, value) in self.skinAttributes:
if attrib == "font":
self.l.setFont(0, parseFont(value, ((1,1),(1,1))))
elif attrib == "descriptionFont":
self.descriptionFont = parseFont(value, ((1,1),(1,1)))
self.l.setFont(1, self.descriptionFont)
elif attrib == "itemHeight":
self.l.setItemHeight(int(value))
else:
attribs.append((attrib, value))
self.skinAttributes = attribs
return MenuList.applySkin(self, desktop, parent)
开发者ID:13K-OMAR,项目名称:enigma2-plugins-sh4,代码行数:15,代码来源:RSSList.py
示例12: applySkin
def applySkin(self, desktop, parent):
# This is a very bad way to get the skin attributes
# This function is called for every skin element, we should parse the attributes depending on the element name
attribs = [ ]
if self.skinAttributes is not None:
for (attrib, value) in self.skinAttributes:
if attrib == "font":
self.listFont = parseFont(value, ((1,1),(1,1)))
self.l.setFont(0, self.listFont)
elif attrib == "itemHeight":
self.itemHeight = int(value)
self.l.setItemHeight(self.itemHeight)
elif attrib == "iconPosX":
self.iconPosX = int(value)
elif attrib == "iconPosY":
self.iconPosY = int(value)
elif attrib == "iconSize":
self.iconSize = int(value)
elif attrib == "colWidthStb":
self.colWidthStb = int(value)
elif attrib == "colWidthWeb":
self.colWidthWeb = int(value)
elif attrib == "margin":
self.margin = int(value)
else:
attribs.append((attrib, value))
self.skinAttributes = attribs
return MenuList.applySkin(self, desktop, parent)
开发者ID:betonme,项目名称:e2openplugin-SeriesPlugin,代码行数:28,代码来源:ChannelEditor.py
示例13: applySkin
def applySkin(self, desktop, parent):
attribs = [ ]
from enigma import eSize
def parseSize(str):
x, y = str.split(',')
return eSize(int(x), int(y))
for (attrib, value) in self.skinAttributes:
if attrib == "size":
self.instance.setSize(parseSize(value))
attribs.append((attrib,value))
elif attrib == "nocColor":
self.nocColor = parseColor(value)
elif attrib == "emmColor":
self.emmColor = parseColor(value)
elif attrib == "ecmColor":
self.ecmColor = parseColor(value)
elif attrib == "font":
self.font = parseFont(value, ((1,1),(1,1)))
elif attrib == "backgroundColor":
self.backgroundColor = parseColor(value)
self.instance.clear(self.backgroundColor)
attribs.append((attrib,value))
else:
attribs.append((attrib,value))
self.skinAttributes = attribs
return Renderer.applySkin(self, desktop, parent)
开发者ID:bigroma73,项目名称:domica-skins,代码行数:29,代码来源:DMCHDCaids.py
示例14: __init__
def __init__(self, enableWrapAround = True):
GUIComponent.__init__(self)
self.posFont = parseFont("Regular;20", ((1,1),(1,1)))
self.nameFont = parseFont("Regular;20", ((1,1),(1,1)))
self.itemHeight = 30
self.posColor = 0xFFFFFF
self.posColorSel = 0xFFFFFF
self.nameColor = 0xFFFFFF
self.nameColorSel = 0xFFFFFF
self.l = eListboxPythonMultiContent()
self.l.setFont(0, self.posFont)
self.l.setFont(1, self.nameFont)
self.onSelectionChanged = []
开发者ID:sunder67,项目名称:e2openplugin-EnhancedMovieCenter,代码行数:18,代码来源:EMCPlayList.py
示例15: applySkin
def applySkin(self, desktop, parent):
attribs = []
from enigma import eSize
def parseSize(str):
x, y = str.split(",")
return eSize(int(x), int(y))
for attrib, value in self.skinAttributes:
if attrib == "size":
self.instance.setSize(parseSize(value))
self.size = parseSize(value)
attribs.append((attrib, value))
elif attrib == "backgroundColor":
self.backgroundColor = parseColor(value)
elif attrib == "emmColor":
self.emmColor = parseColor(value)
elif attrib == "ecmColor":
self.ecmColor = parseColor(value)
elif attrib == "font":
self.font = parseFont(value, ((1, 1), (1, 1)))
elif attrib == "ftaFont":
self.ftaFont = parseFont(value, ((1, 1), (1, 1)))
elif attrib == "foregroundColor":
self.foregroundColor = parseColor(value)
elif attrib == "noColor":
self.noColor = parseColor(value)
elif attrib == "ftaColor":
self.ftaColor = parseColor(value)
elif attrib == "ftaText":
self.ftaText = value
elif attrib == "fta":
self.fta = value
elif attrib == "vOffsetText":
self.vOffset = value
elif attrib == "bgCAIDs":
self.bgCAIDs = value
else:
attribs.append((attrib, value))
self.skinAttributes = attribs
return Renderer.applySkin(self, desktop, parent)
开发者ID:erolmutlu,项目名称:openpli,代码行数:42,代码来源:TSCaids.py
示例16: applySkin
def applySkin(self, desktop, screen):
if self.skinAttributes is not None:
attribs = [ ]
for (attrib, value) in self.skinAttributes:
if attrib == "foregroundColor":
self.foreColor = parseColor(value).argb()
elif attrib == "borderColor":
self.borderColor = parseColor(value).argb()
elif attrib == "backgroundColor":
self.backColor = parseColor(value).argb()
elif attrib == "font":
self.l.setFont(0, parseFont(value, ((1,1),(1,1)) ))
elif attrib == "borderWidth":
self.borderWidth = int(value)
elif attrib == "TimelineFont":
font = parseFont(value, ((1,1),(1,1)) )
self.timelineFontName = font.family
self.timelineFontSize = font.pointSize
else:
attribs.append((attrib,value))
self.skinAttributes = attribs
return GUIComponent.applySkin(self, desktop, screen)
开发者ID:conchobair,项目名称:enigma2,代码行数:22,代码来源:EpgList.py
示例17: applySkin
def applySkin(self, desktop, parent):
attribs = [ ]
if self.skinAttributes is not None:
for (attrib, value) in self.skinAttributes:
if attrib == "font":
self.l.setFont(0, parseFont(value, ((1,1),(1,1))))
elif attrib == "itemHeight":
self.l.setItemHeight(int(value))
elif attrib == "colorDisabled":
self.colorDisabled = parseColor(value).argb()
else:
attribs.append((attrib, value))
self.skinAttributes = attribs
return MenuList.applySkin(self, desktop, parent)
开发者ID:dpuschek,项目名称:enigma2-plugins,代码行数:14,代码来源:AutoTimerList.py
示例18: applySkin
def applySkin(self, desktop, screen):
if self.skinAttributes is not None:
attribs = [ ]
for (attrib, value) in self.skinAttributes:
if attrib == "font":
font = skin.parseFont(value, ((1,1),(1,1)))
self.fontName = font.family
self.fontSize = font.pointSize
else:
attribs.append((attrib,value))
self.skinAttributes = attribs
rc = GUIComponent.applySkin(self, desktop, screen)
self.listHeight = self.instance.size().height()
self.listWidth = self.instance.size().width()
self.setItemsPerPage()
return rc
开发者ID:Trancemaster2,项目名称:enigma2,代码行数:16,代码来源:MovieList.py
示例19: applySkin
def applySkin(self, desktop, parent):
attribs = [ ]
if self.skinAttributes is not None:
for (attrib, value) in self.skinAttributes:
if attrib == "font":
self.l.setFont(0, parseFont(value, ((1,1),(1,1))))
elif attrib == "itemHeight":
self.l.setItemHeight(int(value))
elif attrib == "selectedColor":
self.selectedColor = int(parseColor(value))
elif attrib == "hiddenColor":
self.hiddenColor = int(parseColor(value))
else:
attribs.append((attrib, value))
self.skinAttributes = attribs
return MenuList.applySkin(self, desktop, parent)
开发者ID:Haehnchen,项目名称:enigma2-plugins,代码行数:16,代码来源:plugin.py
示例20: applySkin
def applySkin(self, desktop, screen):
if self.skinAttributes is not None:
attribs = [ ]
for (attrib, value) in self.skinAttributes:
if attrib == "font":
font = skin.parseFont(value, ((1,1),(1,1)))
self.fontName = font.family
self.fontSize = font.pointSize
elif attrib == "itemHeight":
self.ItemHeight = int(value)
else:
attribs.append((attrib,value))
self.skinAttributes = attribs
rc = GUIComponent.applySkin(self, desktop, screen)
self.setFontsize()
self.l.setItemHeight(self.ItemHeight)
return rc
开发者ID:OpenViX,项目名称:enigma2,代码行数:17,代码来源:ServiceInfo.py
注:本文中的skin.parseFont函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论