style.setStyle(painter, eWindowStyle::styleListboxNormal);
if (pbackColor)
{
- int color = PyInt_AsLong(pbackColor);
+ unsigned int color = PyInt_AsUnsignedLongMask(pbackColor);
painter.setBackgroundColor(gRGB(color));
} // transparent background?
// if we have a local background color set, use that.
style.setStyle(painter, eWindowStyle::styleListboxSelected);
if (pbackColorSelected)
{
- int color = PyInt_AsLong(pbackColorSelected);
+ unsigned int color = PyInt_AsUnsignedLongMask(pbackColorSelected);
painter.setBackgroundColor(gRGB(color));
}
else if (local_style && local_style->m_background_color_selected_set)
style.setStyle(painter, eWindowStyle::styleListboxSelected);
if (pbackColorSelected)
{
- int color = PyInt_AsLong(pbackColorSelected);
+ unsigned int color = PyInt_AsUnsignedLongMask(pbackColorSelected);
painter.setBackgroundColor(gRGB(color));
}
else if (local_style && local_style->m_background_color_selected_set)
style.setStyle(painter, eWindowStyle::styleListboxNormal);
if (pbackColor)
{
- int color = PyInt_AsLong(pbackColor);
+ unsigned int color = PyInt_AsUnsignedLongMask(pbackColor);
painter.setBackgroundColor(gRGB(color));
}/* if we have a local background color set, use that. */
else if (local_style && local_style->m_background_color_set)
{
if (pforeColorSelected)
{
- int color = PyInt_AsLong(pforeColorSelected);
+ unsigned int color = PyInt_AsUnsignedLongMask(pforeColorSelected);
painter.setForegroundColor(gRGB(color));
}
/* if we have a local foreground color set, use that. */
{
if (pforeColor)
{
- int color = PyInt_AsLong(pforeColor);
+ unsigned int color = PyInt_AsUnsignedLongMask(pforeColor);
painter.setForegroundColor(gRGB(color));
}
/* if we have a local foreground color set, use that. */
if ((!color) && (!data))
return color;
- unsigned int icolor = PyInt_AsLong(color);
+ unsigned int icolor = PyInt_AsUnsignedLongMask(color);
/* check if we have the "magic" template color */
if ((icolor & 0xFF000000) == 0xFF000000)
painter.clip(rect);
if (pborderColor)
{
- int color = PyInt_AsLong(pborderColor);
+ unsigned int color = PyInt_AsUnsignedLongMask(pborderColor);
painter.setForegroundColor(gRGB(color));
}