X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/fe1ef885de1c0dc41100df0453ecf1c2ed5cf7e8..4ad28359f1e3090e963e1a8083c34c0940d0514d:/data/skin.xml diff --git a/data/skin.xml b/data/skin.xml index bf6465cd..2d920f84 100644 --- a/data/skin.xml +++ b/data/skin.xml @@ -1,14 +1,16 @@ - - + + + + @@ -19,7 +21,8 @@ - + + @@ -32,89 +35,112 @@ - """ """ + - - - + + + + + + - + + - - + + + + - + + + + - + - - - - + + + + + - - - - + + + + + + + + + + + + + + + + + + + - + - - - - - - - + - - + + + + + - - + + - - - + + + - - - - + + + + + + + + - - - - - - + + - - - - - - + + + + + + + @@ -129,11 +155,28 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -141,77 +184,231 @@ - - - - - - - - - - - - - - - - - + + + + + + + - - + + + + + - - - - + + + - + - - - - - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# this should be factored out into some helper code, but currently demonstrates applets. +from enigma import eSize, ePoint + +orgwidth = self.instance.size().width() +orgpos = self.instance.position() +textsize = self["text"].getSize() + +# y size still must be fixed in font stuff... +textsize = (textsize[0] + 50, textsize[1] + 50) +count = len(self.list) +if count > 6: + count = 6 +offset = 30 * count +wsizex = textsize[0] + 60 +wsizey = textsize[1] + offset +if (400 > wsizex): + wsizex = 400 +wsize = (wsizex, wsizey) + + +# resize +self.instance.resize(eSize(*wsize)) + +# resize label +self["text"].instance.resize(eSize(*textsize)) + +# move list +listsize = (wsizex, 30 * len(self.list)) +self["list"].instance.move(ePoint(0, textsize[1])) +self["list"].instance.resize(eSize(*listsize)) + +# center window +newwidth = wsize[0] +self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) + - - - - - + + + + + - - - - - + + + + + + + + + + + + + + # this should be factored out into some helper code, but currently demonstrates applets. from enigma import eSize, ePoint @@ -221,15 +418,28 @@ orgpos = self.instance.position() textsize = self["text"].getSize() # y size still must be fixed in font stuff... -textsize = (textsize[0], textsize[1] + 50) -wsize = (textsize[0] + 50, textsize[1] + 50) +textsize = (textsize[0] + 50, textsize[1] + 50) +offset = 0 +if self.type == self.TYPE_YESNO: + offset = 60 +wsizex = textsize[0] + 60 +wsizey = textsize[1] + offset +if (280 > wsizex): + wsizex = 280 +wsize = (wsizex, wsizey) -# resize + +# resize self.instance.resize(eSize(*wsize)) # resize label self["text"].instance.resize(eSize(*textsize)) +# move list +listsize = (wsizex, 50) +self["list"].instance.move(ePoint(0, textsize[1])) +self["list"].instance.resize(eSize(*listsize)) + # center window newwidth = wsize[0] self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))