X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/d279cc40f4a1d927ad00bfe7b0ee3a303e9aed44..31199ef6b4d897a838ee6dafd964d1c2dcd1820c:/lib/python/Components/GUIComponent.py diff --git a/lib/python/Components/GUIComponent.py b/lib/python/Components/GUIComponent.py index 41461306..401a004d 100644 --- a/lib/python/Components/GUIComponent.py +++ b/lib/python/Components/GUIComponent.py @@ -8,6 +8,7 @@ class GUIComponent(object): def __init__(self): self.instance = None self.visible = 1 + self.skinAttributes = None def execBegin(self): pass @@ -28,10 +29,25 @@ class GUIComponent(object): def applySkin(self, desktop): if not self.visible: self.instance.hide() + + if self.skinAttributes is None: + print "warning, skin is missing some elements." + return + skin.applyAllAttributes(self.instance, desktop, self.skinAttributes) - def move(self, x, y): - self.instance.move(ePoint(int(x), int(y))) + def move(self, x, y = None): + # we assume, that x is already an ePoint + if y is None: + self.instance.move(x) + else: + self.instance.move(ePoint(int(x), int(y))) + + def resize(self, size): + self.instance.resize(size) + + def setZPosition(self, z): + self.instance.setZPosition(z) def show(self): self.__visible = 1