int s = size();
if ( m_cursor >= s )
m_listbox->moveSelectionTo(s?s-1:0);
- m_listbox->invalidate();
+ else
+ m_listbox->invalidate();
}
}
if (plist && PyList_Check(plist))
entries = PyList_Size(plist);
+ int left=0, right=0, last=-1;
+ eRect bbox;
for (int i = 0; i < entries; ++i)
{
ePyObject entry = PyList_GET_ITEM(plist, i);
eWarning("glyph index %d in PythonConfigList out of bounds!", num);
else
{
+ if (last+1 != num && last != -1) {
+ bbox = eRect(left, offset.y(), right-left, m_itemsize.height());
+ painter.fill(bbox);
+ }
para->setGlyphFlag(num, GS_INVERT);
- eRect bbox;
bbox = para->getGlyphBBox(num);
- bbox = eRect(bbox.left(), offset.y(), bbox.width(), m_itemsize.height());
- painter.fill(bbox);
+ if (last+1 != num || last == -1)
+ left = bbox.left();
+ right = bbox.left() + bbox.width();
+ last = num;
}
/* entry is borrowed */
}
-
+ if (last != -1) {
+ bbox = eRect(left, offset.y(), right-left, m_itemsize.height());
+ painter.fill(bbox);
+ }
painter.renderPara(para, ePoint(0, 0));
/* pvalue is borrowed */
/* plist is 0 or borrowed */
{
if (pforeColorSelected)
{
- int color = PyInt_AsLong(pforeColor);
+ int color = PyInt_AsLong(pforeColorSelected);
painter.setForegroundColor(gRGB(color));
}
/* if we have a local foreground color set, use that. */
int color = PyInt_AsLong(pborderColor);
painter.setForegroundColor(gRGB(color));
}
- else if (pforeColor) // reset to normal color
- style.setStyle(painter, selected ? eWindowStyle::styleListboxSelected : eWindowStyle::styleListboxNormal);
rect.setRect(x, y, width, bwidth);
painter.fill(rect);
else
m_old_clip = m_clip = gRegion::invalidRegion();
}
+
+void eListboxPythonMultiContent::entryRemoved(int idx)
+{
+ if (m_listbox)
+ m_listbox->entryRemoved(idx);
+}