diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-02-03 21:02:40 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-02-03 21:02:40 +0000 |
| commit | 236458043cfd6eb332f272c7782f1a2948af96c3 (patch) | |
| tree | 7764be4771b55d063fbdfad55eaa55fde4f3f712 /lib/gui/elabel.cpp | |
| parent | 4fa2e34948cf2f4b58d44116328499b35a56b470 (diff) | |
| download | enigma2-236458043cfd6eb332f272c7782f1a2948af96c3.tar.gz enigma2-236458043cfd6eb332f272c7782f1a2948af96c3.zip | |
fix warning, redraw on changed foreground color
Diffstat (limited to 'lib/gui/elabel.cpp')
| -rw-r--r-- | lib/gui/elabel.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/gui/elabel.cpp b/lib/gui/elabel.cpp index 3cec3a1c..018ce95b 100644 --- a/lib/gui/elabel.cpp +++ b/lib/gui/elabel.cpp @@ -40,7 +40,7 @@ int eLabel::event(int event, void *data, void *data2) 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); @@ -134,13 +134,21 @@ void eLabel::setHAlign(int align) 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() |
