- #query skin colors
- col = queryColor("GraphEpg.Foreground")
- self.foreColor = col and col.argb()
-
- col = queryColor("GraphEpg.Border")
- self.borderColor = col and col.argb()
-
- col = queryColor("GraphEpg.Background")
- if col is None:
- self.backColor = 0x586d88
- else:
- self.backColor = col.argb()
-
- col = queryColor("GraphEpg.BackgroundSelected")
- if col is None:
- self.backColorSelected = 0x808080
- else:
- self.backColorSelected = col.argb()
+ self.foreColor = None
+ self.foreColorSelected = None
+ self.borderColor = None
+ self.backColor = 0x586d88
+ self.backColorSelected = 0x808080
+ self.foreColorService = None
+ self.backColorService = None
+
+ 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 == "EntryBorderColor":
+ self.borderColor = parseColor(value).argb()
+ elif attrib == "EntryBackgroundColor":
+ self.backColor = parseColor(value).argb()
+ elif attrib == "EntryBackgroundColorSelected":
+ self.backColorSelected = parseColor(value).argb()
+ elif attrib == "ServiceNameForegroundColor":
+ self.foreColorService = parseColor(value).argb()
+ elif attrib == "ServiceNameBackgroundColor":
+ self.backColorService = parseColor(value).argb()
+ else:
+ attribs.append((attrib,value))
+ self.skinAttributes = attribs
+ return GUIComponent.applySkin(self, desktop, screen)