git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4347756
)
handle case of empty text
author
Felix Domke
<tmbinc@elitedvb.net>
Sun, 20 Apr 2008 20:43:49 +0000
(20:43 +0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Sun, 20 Apr 2008 20:43:49 +0000
(20:43 +0000)
lib/python/Components/ScrollLabel.py
patch
|
blob
|
history
diff --git
a/lib/python/Components/ScrollLabel.py
b/lib/python/Components/ScrollLabel.py
index 109dc8e42bd689cc2766dfac84fcb1ba1b604c39..253353bb4d5c120bcf863862e77391aee97fc1ec 100644
(file)
--- a/
lib/python/Components/ScrollLabel.py
+++ b/
lib/python/Components/ScrollLabel.py
@@
-30,6
+30,8
@@
class ScrollLabel(HTMLComponent, GUIComponent):
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)))