X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/bcd547d5342643954ae8be37befa480e8b240c31..c69bb079fef352b7b34eac8739b0dc051629cb7b:/lib/python/Components/ScrollLabel.py diff --git a/lib/python/Components/ScrollLabel.py b/lib/python/Components/ScrollLabel.py index 109dc8e4..46d22abc 100644 --- a/lib/python/Components/ScrollLabel.py +++ b/lib/python/Components/ScrollLabel.py @@ -13,10 +13,10 @@ 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) + skin.applyAllAttributes(self.long_text, desktop, self.skinAttributes, parent.scale) widget_attribs = [ ] scrollbar_attribs = [ ] for (attrib, value) in self.skinAttributes: @@ -24,12 +24,14 @@ class ScrollLabel(HTMLComponent, GUIComponent): 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) - skin.applyAllAttributes(self.scrollbar, desktop, scrollbar_attribs+widget_attribs) + 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)))