X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fgui%2Felistboxcontent.cpp;h=3c9457e1b5916751f652502bd1f1386dbb4f5f55;hb=11e416ae02c53daa3841096e9792804f3d0e51dd;hp=4da1618c5762e4c535e8c8079ca9896df1c69eb3;hpb=0e108a2c3db6dcfd67bad79dde7a926dab72308d;p=vuplus_dvbapp diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index 4da1618..3c9457e 100644 --- a/lib/gui/elistboxcontent.cpp +++ b/lib/gui/elistboxcontent.cpp @@ -182,7 +182,7 @@ void eListboxPythonStringContent::paint(gPainter &painter, eWindowStyle &style, { if (local_style->m_background && cursorValid) painter.blit(local_style->m_background, offset, eRect(), gPainter::BT_ALPHATEST); - else + else if (selected && !local_style->m_selection) painter.clear(); } @@ -319,7 +319,7 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style, { if (local_style->m_background && cursorValid) painter.blit(local_style->m_background, offset, eRect(), gPainter::BT_ALPHATEST); - else + else if (selected && !local_style->m_selection) painter.clear(); } @@ -533,6 +533,8 @@ static void clearRegionHelper(gPainter &painter, eListboxStyle *local_style, con painter.blit(local_style->m_background, offset, eRect(), 0); return; } + else if (local_style->m_transparent_background) + return; } painter.clear(); } @@ -907,6 +909,10 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c if ((filled < 0) && data) /* if the string is in a negative number, it refers to the 'data' list. */ filled = PyInt_AsLong(PyTuple_GetItem(data, -filled)); + + /* don't do anything if percent out of range */ + if ((filled < 0) || (filled > 100)) + continue; int bwidth = pborderWidth ? PyInt_AsLong(pborderWidth) : 2; @@ -1002,7 +1008,7 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c } } - if (selected && (!local_style || !local_style->m_selection)) + if (selected && !sel_clip.valid() && (!local_style || !local_style->m_selection)) style.drawFrame(painter, eRect(offset, m_itemsize), eWindowStyle::frameListboxEntry); error_out: @@ -1041,7 +1047,7 @@ int eListboxPythonMultiContent::currentCursorSelectable() { bool retval = ret == Py_True; Py_DECREF(ret); - return ret; + return retval; } eDebug("call m_selectableFunc failed!!! assume not callable"); }