Пример #1
0
	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)
	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) 
Пример #3
0
	def applySkin(self, desktop, parent):
		def itemHeight(value):
			self.itemHeight = int(value)
		def ServiceNameFont(value):
			self.ServiceNameFont = parseFont(value, ((1,1),(1,1)))
		def EventNameFont(value):
			self.EventNameFont = parseFont(value, ((1,1),(1,1)))
		def DayNameFont(value):
			self.DayNameFont = parseFont(value, ((1,1),(1,1)))
		def rowHeight(value):
			self.rowHeight = int(value)
		def rowSplit1(value):
			self.rowSplit1 = int(value)
		def rowSplit2(value):
			self.rowSplit2 = int(value)
		def iconMargin(value):
			self.iconMargin = int(value)
		for (attrib, value) in list(self.skinAttributes):
			try:
				locals().get(attrib)(value)
				self.skinAttributes.remove((attrib, value))
			except:
				pass
		self.l.setItemHeight(self.itemHeight)
		self.l.setFont(0, self.ServiceNameFont)
		self.l.setFont(1, self.EventNameFont)
		self.l.setFont(2, self.DayNameFont)
		return MenuList.applySkin(self, desktop, parent)
Пример #4
0
	def applySkin(self, desktop, parent):
		def itemHeight(value):
			self.itemHeight = int(value)
		def ServiceNameFont(value):
			self.ServiceNameFont = parseFont(value, ((1,1),(1,1)))
		def EventNameFont(value):
			self.EventNameFont = parseFont(value, ((1,1),(1,1)))
		def DayNameFont(value):
			self.DayNameFont = parseFont(value, ((1,1),(1,1)))
		def rowHeight(value):
			self.rowHeight = int(value)
		def rowSplit1(value):
			self.rowSplit1 = int(value)
		def rowSplit2(value):
			self.rowSplit2 = int(value)
		def iconMargin(value):
			self.iconMargin = int(value)
		for (attrib, value) in list(self.skinAttributes):
			try:
				locals().get(attrib)(value)
				self.skinAttributes.remove((attrib, value))
			except:
				pass
		self.l.setItemHeight(self.itemHeight)
		self.l.setFont(0, self.ServiceNameFont)
		self.l.setFont(1, self.EventNameFont)
		self.l.setFont(2, self.DayNameFont)
		return MenuList.applySkin(self, desktop, parent)
	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))
				else:
					attribs.append((attrib, value))
		self.skinAttributes = attribs
		return MenuList.applySkin(self, desktop, parent)
Пример #6
0
 def applySkin(self, desktop, parent):
     attribs = []
     if self.skinAttributes is not None:
         for (attrib, value) in self.skinAttributes:
             if attrib == "font":
                 self.font = parseFont(value, ((1, 1), (1, 1)))
                 self.l.setFont(0, self.font)
             elif attrib == "itemHeight":
                 self.l.setItemHeight(int(value))
             else:
                 attribs.append((attrib, value))
         self.skinAttributes = attribs
     return MenuList.applySkin(self, desktop, parent)
Пример #7
0
	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 = parseColor(value).argb()
				elif attrib == "hiddenColor":
					self.hiddenColor = int(parseColor(value))
				else:
					attribs.append((attrib, value))
		self.skinAttributes = attribs
		return MenuList.applySkin(self, desktop, parent)
Пример #8
0
 def applySkin(self, desktop, parent):
     attribs = []
     if self.skinAttributes is not None:
         for (attrib, value) in self.skinAttributes:
             if attrib == "font":
                 if self.style_autotimerslist == "standard":
                     self.l.setFont(0, parseFont(value, ((1, 1), (1, 1))))
             elif attrib == "itemHeight":
                 if self.style_autotimerslist == "standard":
                     self.l.setItemHeight(int(value))
             elif attrib == "colorDisabled":
                 if self.style_autotimerslist == "standard":
                     self.colorDisabled = parseColor(value).argb()
             else:
                 attribs.append((attrib, value))
     self.skinAttributes = attribs
     return MenuList.applySkin(self, desktop, parent)
Пример #9
0
	def applySkin(self, desktop, parent):
		attribs = [ ] 
		if self.skinAttributes is not None:
			for (attrib, value) in self.skinAttributes:
				if attrib == "font":
					if config.plugins.autotimer.style_autotimerslist.value == "standard":
						self.l.setFont(0, parseFont(value, ((1,1),(1,1))))
				elif attrib == "itemHeight":
					if config.plugins.autotimer.style_autotimerslist.value == "standard":
						self.l.setItemHeight(int(value))
				elif attrib == "colorDisabled":
					if config.plugins.autotimer.style_autotimerslist.value == "standard":
						self.colorDisabled = parseColor(value).argb()
				else:
					attribs.append((attrib, value))
		self.skinAttributes = attribs
		return MenuList.applySkin(self, desktop, parent)
Пример #10
0
 def applySkin(self, desktop, parent):
     return MenuList.applySkin(self, desktop, parent)
Пример #11
0
 def applySkin(self, desktop, parent):
     return MenuList.applySkin(self, desktop, parent)