diff options
| author | Felix Domke <felix.domke@multimedia-labs.de> | 2009-07-16 23:39:16 +0200 |
|---|---|---|
| committer | Felix Domke <felix.domke@multimedia-labs.de> | 2009-07-16 23:39:30 +0200 |
| commit | 264dadf9ecebe4b79648d971f3f8d9f1555f2447 (patch) | |
| tree | b70bdd82aa2a3cc62b0b6534ca6ecc0efbb0bbef /lib | |
| parent | e02c9fd73f0043ed1f57ec448a5a2c8765f55ae1 (diff) | |
| download | enigma2-264dadf9ecebe4b79648d971f3f8d9f1555f2447.tar.gz enigma2-264dadf9ecebe4b79648d971f3f8d9f1555f2447.zip | |
allow use of alphablended pixmaps in multicontent lists
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/gui/elistboxcontent.cpp | 3 | ||||
| -rw-r--r-- | lib/gui/elistboxcontent.h | 2 | ||||
| -rw-r--r-- | lib/python/Components/MultiContent.py | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index e05da215..4b4b58c1 100644 --- a/lib/gui/elistboxcontent.cpp +++ b/lib/gui/elistboxcontent.cpp @@ -945,6 +945,7 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c break; } + case TYPE_PIXMAP_ALPHABLEND: case TYPE_PIXMAP_ALPHATEST: case TYPE_PIXMAP: // pixmap { @@ -997,7 +998,7 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c clearRegion(painter, style, local_style, ePyObject(), ePyObject(), pbackColor, pbackColorSelected, selected, rc, sel_clip, offset, cursorValid); } - painter.blit(pixmap, rect.topLeft(), rect, (type == TYPE_PIXMAP_ALPHATEST) ? gPainter::BT_ALPHATEST : 0); + painter.blit(pixmap, rect.topLeft(), rect, (type == TYPE_PIXMAP_ALPHATEST) ? gPainter::BT_ALPHATEST : (type == TYPE_PIXMAP_ALPHABLEND) ? gPainter::BT_ALPHABLEND : 0); painter.clippop(); break; } diff --git a/lib/gui/elistboxcontent.h b/lib/gui/elistboxcontent.h index 6bb45590..d3d2a089 100644 --- a/lib/gui/elistboxcontent.h +++ b/lib/gui/elistboxcontent.h @@ -69,7 +69,7 @@ class eListboxPythonMultiContent: public eListboxPythonStringContent public: eListboxPythonMultiContent(); ~eListboxPythonMultiContent(); - enum { TYPE_TEXT, TYPE_PROGRESS, TYPE_PIXMAP, TYPE_PIXMAP_ALPHATEST }; + enum { TYPE_TEXT, TYPE_PROGRESS, TYPE_PIXMAP, TYPE_PIXMAP_ALPHATEST, TYPE_PIXMAP_ALPHABLEND }; void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected); int currentCursorSelectable(); void setList(SWIG_PYOBJECT(ePyObject) list); diff --git a/lib/python/Components/MultiContent.py b/lib/python/Components/MultiContent.py index 6afd0941..1e6f3e02 100644 --- a/lib/python/Components/MultiContent.py +++ b/lib/python/Components/MultiContent.py @@ -11,6 +11,9 @@ def MultiContentEntryPixmap(pos = (0, 0), size = (0, 0), png = None, backcolor = def MultiContentEntryPixmapAlphaTest(pos = (0, 0), size = (0, 0), png = None, backcolor = None, backcolor_sel = None): return (eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, pos[0], pos[1], size[0], size[1], png, backcolor, backcolor_sel) +def MultiContentEntryPixmapAlphaBlend(pos = (0, 0), size = (0, 0), png = None, backcolor = None, backcolor_sel = None): + return (eListboxPythonMultiContent.TYPE_PIXMAP_ALPHABLEND, pos[0], pos[1], size[0], size[1], png, backcolor, backcolor_sel) + def MultiContentEntryProgress(pos = (0, 0), size = (0, 0), percent = None, borderWidth = None, foreColor = None, backColor = None, backColorSelected = None): return (eListboxPythonMultiContent.TYPE_PROGRESS, pos[0], pos[1], size[0], size[1], percent, borderWidth, foreColor, backColor, backColorSelected) |
