X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FScrollLabel.py;h=46d22abc6451c2ebb3878d777a6c4e305b71178a;hb=e2be31452f7c2d90fa7008583f36d6a6583cc83a;hp=fb89e4114b5da3d2446d54a31f19b8e247f33e36;hpb=d7c4babd6e6040f085d118086d03419036c31b48;p=vuplus_dvbapp diff --git a/lib/python/Components/ScrollLabel.py b/lib/python/Components/ScrollLabel.py index fb89e41..46d22ab 100644 --- a/lib/python/Components/ScrollLabel.py +++ b/lib/python/Components/ScrollLabel.py @@ -13,20 +13,25 @@ class ScrollLabel(HTMLComponent, GUIComponent): self.pages = None self.total = None - def applySkin(self, desktop): + def applySkin(self, desktop, parent): ret = False if self.skinAttributes is not None: - skin.applyAllAttributes(self.long_text, desktop, self.skinAttributes) - attribs = [ ] + skin.applyAllAttributes(self.long_text, desktop, self.skinAttributes, parent.scale) + widget_attribs = [ ] + scrollbar_attribs = [ ] for (attrib, value) in self.skinAttributes: - if attrib.find("Color") != -1 or attrib.find("transparent") != -1: - attribs.append((attrib,value)) - skin.applyAllAttributes(self.instance, desktop, attribs) - skin.applyAllAttributes(self.scrollbar, desktop, attribs) + if attrib.find("borderColor") != -1 or attrib.find("borderWidth") != -1: + scrollbar_attribs.append((attrib,value)) + if attrib.find("transparent") != -1 or attrib.find("backgroundColor") != -1: + widget_attribs.append((attrib,value)) + skin.applyAllAttributes(self.instance, desktop, widget_attribs, parent.scale) + skin.applyAllAttributes(self.scrollbar, desktop, scrollbar_attribs+widget_attribs, parent.scale) ret = True s = self.long_text.size() self.instance.move(self.long_text.position()) lineheight=fontRenderClass.getInstance().getLineHeight( self.long_text.getFont() ) + if not lineheight: + lineheight = 30 # assume a random lineheight if nothing is visible lines = (int)(s.height() / lineheight) self.pageHeight = (int)(lines * lineheight) self.instance.resize(eSize(s.width(), self.pageHeight+(int)(lineheight/6)))