diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2008-04-20 20:43:49 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2008-04-20 20:43:49 +0000 |
| commit | 896d63aa5605a9b6ef641830eae4038addc53c60 (patch) | |
| tree | 0b05bc5e6df2fe9d074a6bc2dcc5627389dc4dbf /lib/python | |
| parent | 4347756c56a155ffe3c0ad61c74b385fdad923b4 (diff) | |
| download | enigma2-896d63aa5605a9b6ef641830eae4038addc53c60.tar.gz enigma2-896d63aa5605a9b6ef641830eae4038addc53c60.zip | |
handle case of empty text
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/ScrollLabel.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/python/Components/ScrollLabel.py b/lib/python/Components/ScrollLabel.py index 109dc8e4..253353bb 100644 --- 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))) |
