diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2005-12-12 14:50:42 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2005-12-12 14:50:42 +0000 |
| commit | 4374783e912d1a9385a41d7649d33f19e8eb96b3 (patch) | |
| tree | c9a77e986930469e20699cc5ba92f9e9d7362bcd /lib/python/Components/ScrollLabel.py | |
| parent | 408c5296eb54925f097cf7b80343a38ba13f4cbf (diff) | |
| download | enigma2-4374783e912d1a9385a41d7649d33f19e8eb96b3.tar.gz enigma2-4374783e912d1a9385a41d7649d33f19e8eb96b3.zip | |
add ability to draw a slider border
Diffstat (limited to 'lib/python/Components/ScrollLabel.py')
| -rw-r--r-- | lib/python/Components/ScrollLabel.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/python/Components/ScrollLabel.py b/lib/python/Components/ScrollLabel.py index 4a5caf6a..62f64b1d 100644 --- a/lib/python/Components/ScrollLabel.py +++ b/lib/python/Components/ScrollLabel.py @@ -16,14 +16,15 @@ class ScrollLabel(HTMLComponent, GUIComponent): skin.applyAllAttributes(self.long_text, desktop, self.skinAttributes) s = self.long_text.size() self.instance.move(self.long_text.position()) - self.scrollbar.move(ePoint(s.width()-20,0)) - self.scrollbar.resize(eSize(20,s.height())) - self.scrollbar.setOrientation(eSlider.orVertical); - self.scrollbar.setRange(0,100) lineheight=fontRenderClass.getInstance().getLineHeight( self.long_text.getFont() ) lines = (int)(s.height() / lineheight) self.pageHeight = (int)(lines * lineheight) self.instance.resize(eSize(s.width(), self.pageHeight+(int)(lineheight/6))) + self.scrollbar.move(ePoint(s.width()-20,0)) + self.scrollbar.resize(eSize(20,self.pageHeight+(int)(lineheight/6))) + self.scrollbar.setOrientation(eSlider.orVertical); + self.scrollbar.setRange(0,100) + self.scrollbar.setBorderWidth(1) self.long_text.move(ePoint(0,0)) self.long_text.resize(eSize(s.width()-30, self.pageHeight*16)) self.setText(self.message) |
