DEFINE_REF(eListboxPythonStringContent);
-eListboxPythonStringContent::eListboxPythonStringContent(): m_itemheight(25)
+eListboxPythonStringContent::eListboxPythonStringContent()
+ :m_cursor(0), m_itemheight(25)
{
}
{
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();
}
{
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();
}
if (PyTuple_Check(item))
{
/* handle left part. get item from tuple, convert to string, display. */
-
text = PyTuple_GET_ITEM(item, 0);
text = PyObject_Str(text); /* creates a new object - old object was borrowed! */
const char *string = (text && PyString_Check(text)) ? PyString_AsString(text) : "<not-a-string>";
int value_alignment_left = !*string;
/* now, handle the value. get 2nd part from tuple*/
- value = PyTuple_GET_ITEM(item, 1);
+ if (PyTuple_Size(item) >= 2) // when no 2nd entry is in tuple this is a non selectable entry without config part
+ value = PyTuple_GET_ITEM(item, 1);
+
if (value)
{
ePyObject args = PyTuple_New(1);
}
}
/* type is borrowed */
- } else
+ } else if (value)
eWarning("eListboxPythonConfigContent: second value of tuple is not a tuple.");
if (value)
Py_DECREF(value);
painter.blit(local_style->m_background, offset, eRect(), 0);
return;
}
+ else if (local_style->m_transparent_background)
+ return;
}
painter.clear();
}
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;
break;
}
+ case TYPE_PIXMAP_ALPHABLEND:
case TYPE_PIXMAP_ALPHATEST:
case TYPE_PIXMAP: // pixmap
{
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;
}
}
}
- 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:
{
bool retval = ret == Py_True;
Py_DECREF(ret);
- return ret;
+ return retval;
}
eDebug("call m_selectableFunc failed!!! assume not callable");
}