diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index ac9cc8acb..955a3b5a3 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -159,6 +159,7 @@ void CTextBox::initVar(void) m_pcFontText = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]; m_nFontTextHeight = getFontTextHeight(); m_nMaxTextWidth = 0; + m_bg_painted = false; m_nNrOfPages = 1; m_nNrOfLines = 0; @@ -648,6 +649,7 @@ void CTextBox::refreshText(void) //TRACE("[CTextBox] %s paint bg %d\r\n", __FUNCTION__, __LINE__); //paint full background only on new text, otherwise paint required background frameBuffer->paintBoxRel(ax, ay, dx, dy, m_textBackgroundColor, m_nBgRadius, BgRadiusType); + m_bg_painted = true; } } else{ @@ -716,7 +718,8 @@ void CTextBox::refreshText(void) frameBuffer->paintBoxRel(tx, ty-th, tw, th, COL_RED, m_nBgRadius, m_nBgRadiusType); #endif //TRACE("[CTextBox] %s Line %d m_cFrame.iX %d m_cFrameTextRel.iX %d\r\n", __FUNCTION__, __LINE__, m_cFrame.iX, m_cFrameTextRel.iX); - m_pcFontText->RenderString(tx, ty, tw, m_cLineArray[i].c_str(), m_textColor, 0, m_renderMode | ((m_utf8_encoded) ? Font::IS_UTF8 : 0)); + if (m_bg_painted || m_old_cText != m_cText) + m_pcFontText->RenderString(tx, ty, tw, m_cLineArray[i].c_str(), m_textColor, 0, m_renderMode | ((m_utf8_encoded) ? Font::IS_UTF8 : 0)); m_old_cText = m_cText; y += m_nFontTextHeight; } diff --git a/src/gui/widget/textbox.h b/src/gui/widget/textbox.h index c38ea5ef1..afb4e3912 100644 --- a/src/gui/widget/textbox.h +++ b/src/gui/widget/textbox.h @@ -122,6 +122,7 @@ class CTextBox : public sigc::trackable fb_pixel_t m_old_textBackgroundColor, m_old_textColor; bool m_showTextFrame; + bool m_bg_painted; CBox m_cFrame; CBox m_cFrameTextRel;