CComponentsText: expand setTextColor() methode

apply color value direct in text box object
This commit is contained in:
2015-01-24 22:48:01 +01:00
parent 1b3f5847be
commit 4a0975eb90
2 changed files with 9 additions and 2 deletions

View File

@@ -187,7 +187,7 @@ void CComponentsText::setText(const std::string& stext, const int mode, Font* fo
ct_text_mode = mode;
ct_font = font_text;
if (color_text != 0)
ct_col_text = color_text;
setTextColor(color_text);
dprintf(DEBUG_DEBUG, "[CComponentsText] [%s - %d] ct_text: %s \n", __func__, __LINE__, ct_text.c_str());
}
@@ -298,3 +298,10 @@ int CComponentsText::getTextLinesAutoHeight(const int& textMaxHeight, const int&
return ret;
}
void CComponentsText::setTextColor(const fb_pixel_t& color_text)
{
ct_col_text = color_text;
if (ct_textbox)
ct_textbox->setTextColor(ct_col_text);
}