int glyphs = para->size();
if ((m_pos < 0) || (m_pos >= glyphs))
- eWarning("glyph index %d in eLabel out of bounds!");
+ eWarning("glyph index %d in eLabel out of bounds!", m_pos);
else
{
para->setGlyphFlag(m_pos, GS_INVERT);
void eLabel::setForegroundColor(const gRGB &col)
{
- m_foreground_color = col;
- m_have_foreground_color = 1;
+ if ((!m_have_foreground_color) || !(m_foreground_color == col))
+ {
+ m_foreground_color = col;
+ m_have_foreground_color = 1;
+ invalidate();
+ }
}
void eLabel::clearForegroundColor()
{
- m_have_foreground_color = 0;
+ if (m_have_foreground_color)
+ {
+ m_have_foreground_color = 0;
+ invalidate();
+ }
}
eSize eLabel::calculateSize()