mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
CComponentsText: do also paint text on changed text color
This commit is contained in:
@@ -107,6 +107,7 @@ void CComponentsText::initVarText()
|
||||
ct_text_Vborder = 0;
|
||||
|
||||
ct_col_text = COL_MENUCONTENT_TEXT;
|
||||
ct_old_col_text = ct_col_text;
|
||||
ct_text_sent = false;
|
||||
ct_paint_textbg = false;
|
||||
ct_force_text_paint = false;
|
||||
@@ -150,10 +151,11 @@ void CComponentsText::initCCText()
|
||||
ct_textbox->setWindowMaxDimensions(width, height);
|
||||
ct_textbox->setWindowMinDimensions(width, height);
|
||||
|
||||
//send text to CTextBox object, but paint text only if text has changed or force option is enabled
|
||||
if ((ct_old_text != ct_text) || ct_force_text_paint)
|
||||
//send text to CTextBox object, but paint text only if text or text coloer has changed or force option is enabled
|
||||
if ((ct_old_text != ct_text) || ct_old_col_text != ct_col_text || ct_force_text_paint)
|
||||
ct_text_sent = ct_textbox->setText(&ct_text, this->iWidth);
|
||||
ct_old_text = ct_text;
|
||||
ct_old_text = ct_text;
|
||||
ct_old_col_text = ct_col_text;
|
||||
#ifdef DEBUG_CC
|
||||
printf(" [CComponentsText] [%s - %d] init text: %s [x %d, y %d, w %d, h %d]\n", __FUNCTION__, __LINE__, ct_text.c_str(), this->iX, this->iY, this->iWidth, this->iHeight);
|
||||
#endif
|
||||
|
@@ -46,8 +46,10 @@ class CComponentsText : public CComponentsItem, public CBox
|
||||
///object: Fontrenderer object
|
||||
Font * ct_font;
|
||||
|
||||
///property: CTextBox object
|
||||
///property: text color
|
||||
fb_pixel_t ct_col_text;
|
||||
///property: cached text color
|
||||
fb_pixel_t ct_old_col_text;
|
||||
///property: text display modes, see textbox.h for possible modes
|
||||
int ct_text_mode;
|
||||
///property: horizontal text border width (left and right)
|
||||
|
Reference in New Issue
Block a user