diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2008-04-23 11:32:18 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2008-04-23 11:32:18 +0000 |
| commit | fe0534f76b59b814caca3648933c45d3add31889 (patch) | |
| tree | a05bb683ae8dfb6c73f48be5940590b9aa6e923d /lib/python/Components/GUIComponent.py | |
| parent | f80cd44acb9f06d348f3b0fb09036d7db7e83b66 (diff) | |
| download | enigma2-fe0534f76b59b814caca3648933c45d3add31889.tar.gz enigma2-fe0534f76b59b814caca3648933c45d3add31889.zip | |
prepare for skin updating and scaling
Diffstat (limited to 'lib/python/Components/GUIComponent.py')
| -rw-r--r-- | lib/python/Components/GUIComponent.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/python/Components/GUIComponent.py b/lib/python/Components/GUIComponent.py index a3b1b9e1..b67937e4 100644 --- a/lib/python/Components/GUIComponent.py +++ b/lib/python/Components/GUIComponent.py @@ -1,6 +1,6 @@ import skin -from enigma import ePoint +from enigma import ePoint, eSize class GUIComponent(object): """ GUI component """ @@ -29,14 +29,14 @@ class GUIComponent(object): self.__dict__.clear() # this works only with normal widgets - if you don't have self.instance, override this. - def applySkin(self, desktop): + def applySkin(self, desktop, parent): if not self.visible: self.instance.hide() if self.skinAttributes is None: return False - skin.applyAllAttributes(self.instance, desktop, self.skinAttributes) + skin.applyAllAttributes(self.instance, desktop, self.skinAttributes, parent.scale) return True def move(self, x, y = None): @@ -45,10 +45,13 @@ class GUIComponent(object): self.instance.move(x) else: self.instance.move(ePoint(int(x), int(y))) - - def resize(self, size): - self.instance.resize(size) - + + def resize(self, x, y = None): + if y is None: + self.instance.resize(x) + else: + self.instance.resize(eSize(int(x), int(y))) + def setZPosition(self, z): self.instance.setZPosition(z) |
