From: Felix Domke Date: Thu, 16 Jul 2009 21:39:16 +0000 (+0200) Subject: allow use of alphablended pixmaps in multicontent lists X-Git-Tag: 2.6.0~208 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/264dadf9ecebe4b79648d971f3f8d9f1555f2447 allow use of alphablended pixmaps in multicontent lists --- 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)