mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
CComponentsText: add member to control background paint on textbox objects
This commit is contained in:
@@ -161,7 +161,7 @@ class CComponentsText : public CComponentsItem
|
||||
fb_pixel_t ct_col_text;
|
||||
int ct_text_mode; //see textbox.h for possible modes
|
||||
const char* ct_text;
|
||||
bool ct_text_sent;
|
||||
bool ct_text_sent, ct_paint_textbg;
|
||||
|
||||
void initVarText();
|
||||
void clearCCText();
|
||||
@@ -181,6 +181,7 @@ class CComponentsText : public CComponentsItem
|
||||
virtual inline void setTextFont(Font* font_text){ct_font = font_text;};
|
||||
virtual inline void setTextColor(fb_pixel_t color_text){ ct_col_text = color_text;};
|
||||
virtual inline void setTextMode(const int mode){ct_text_mode = mode;};//see textbox.h for possible modes
|
||||
virtual inline void doPaintTextBoxBg(bool do_paintbox_bg){ ct_paint_textbg = do_paintbox_bg;};
|
||||
virtual void setText(const char* ctext, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL);
|
||||
virtual void setText(const std::string& stext, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL);
|
||||
virtual void setText(neutrino_locale_t locale_text, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL);
|
||||
|
@@ -91,6 +91,7 @@ void CComponentsText::initVarText()
|
||||
ct_text_mode = CTextBox::AUTO_WIDTH;
|
||||
ct_col_text = COL_MENUCONTENT;
|
||||
ct_text_sent = false;
|
||||
ct_paint_textbg = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +125,7 @@ void CComponentsText::initCCText()
|
||||
ct_textbox->setTextMode(ct_text_mode);
|
||||
ct_textbox->setWindowPos(ct_box);
|
||||
ct_textbox->setTextBorderWidth(0);
|
||||
ct_textbox->enableBackgroundPaint(true);
|
||||
ct_textbox->enableBackgroundPaint(ct_paint_textbg);
|
||||
ct_textbox->setBackGroundColor(col_body);
|
||||
ct_textbox->setBackGroundRadius(corner_rad-fr_thickness, corner_type);
|
||||
ct_textbox->setTextColor(ct_col_text);
|
||||
|
Reference in New Issue
Block a user