mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
CComponentsText: expand setTextColor() methode
apply color value direct in text box object
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -116,7 +116,7 @@ class CComponentsText : public CComponentsItem, public CBox
|
||||
///send options for text font (size and type), color and mode (allignment)
|
||||
virtual inline void setTextFont(Font* font_text){ct_font = font_text;};
|
||||
///set text color
|
||||
virtual inline void setTextColor(fb_pixel_t color_text){ ct_col_text = color_text;};
|
||||
virtual void setTextColor(const fb_pixel_t& color_text);
|
||||
///get text color
|
||||
virtual inline fb_pixel_t getTextColor(){return ct_col_text;};
|
||||
///set text alignment, also see textbox.h for possible alignment modes
|
||||
|
Reference in New Issue
Block a user