diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-09-25 14:03:46 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-09-25 14:03:46 +0000 |
| commit | f69890847fc8e8f8031e564b06109582ad49da87 (patch) | |
| tree | 36f11dad2f50fa557480760fce0bf6b5c78e5319 /lib/gui/elistbox.cpp | |
| parent | c68ba62edaf957054397272becae9cbbf7f5b0c9 (diff) | |
| download | enigma2-f69890847fc8e8f8031e564b06109582ad49da87.tar.gz enigma2-f69890847fc8e8f8031e564b06109582ad49da87.zip | |
fix partial clipping for eListboxPythonMultiContent
Diffstat (limited to 'lib/gui/elistbox.cpp')
| -rw-r--r-- | lib/gui/elistbox.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/gui/elistbox.cpp b/lib/gui/elistbox.cpp index b7b1e3ff..c7a46baa 100644 --- a/lib/gui/elistbox.cpp +++ b/lib/gui/elistbox.cpp @@ -226,7 +226,6 @@ void eListbox::moveSelection(int dir) /* redraw the old and newly selected */ gRegion inv = eRect(0, m_itemheight * (m_selected-m_top), size().width(), m_itemheight); inv |= eRect(0, m_itemheight * (oldsel-m_top), size().width(), m_itemheight); - invalidate(inv); } } @@ -294,6 +293,11 @@ void eListbox::updateScrollBar() } } +int eListbox::getEntryTop() +{ + return (m_selected - m_top) * m_itemheight; +} + int eListbox::event(int event, void *data, void *data2) { switch (event) @@ -318,7 +322,7 @@ int eListbox::event(int event, void *data, void *data2) gRegion entryrect = eRect(0, 0, size().width(), m_itemheight); const gRegion &paint_region = *(gRegion*)data; - + for (int y = 0, i = 0; i <= m_items_per_page; y += m_itemheight, ++i) { gRegion entry_clip_rect = paint_region & entryrect; @@ -495,6 +499,14 @@ void eListbox::setSelectionPicture(ePtr<gPixmap> &pm) m_style.m_selection = pm; } +void eListbox::invalidate(const gRegion ®ion) +{ + gRegion tmp(region); + if (m_content) + m_content->updateClip(tmp); + eWidget::invalidate(tmp); +} + struct eListboxStyle *eListbox::getLocalStyle(void) { /* transparency is set directly in the widget */ |
