mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CComponentsHeader: add private member variable cch_text_x
This commit is contained in:
@@ -454,7 +454,7 @@ class CComponentsHeader : public CComponentsForm
|
|||||||
neutrino_locale_t cch_locale_text;
|
neutrino_locale_t cch_locale_text;
|
||||||
fb_pixel_t cch_col_text;
|
fb_pixel_t cch_col_text;
|
||||||
Font* cch_font;
|
Font* cch_font;
|
||||||
int cch_icon_x, cch_items_y;
|
int cch_icon_x, cch_items_y, cch_text_x;
|
||||||
|
|
||||||
void initCCHeaderIcon();
|
void initCCHeaderIcon();
|
||||||
void initCCHeaderText();
|
void initCCHeaderText();
|
||||||
@@ -463,7 +463,6 @@ class CComponentsHeader : public CComponentsForm
|
|||||||
void initVarHeader();
|
void initVarHeader();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CComponentsHeader();
|
CComponentsHeader();
|
||||||
CComponentsHeader(const int x_pos, const int y_pos, const int w, const int h = 0, const std::string& caption = "header", const char* icon_name = NULL, bool has_shadow = CC_SHADOW_OFF,
|
CComponentsHeader(const int x_pos, const int y_pos, const int w, const int h = 0, const std::string& caption = "header", const char* icon_name = NULL, bool has_shadow = CC_SHADOW_OFF,
|
||||||
fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
|
fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
|
||||||
|
@@ -1693,6 +1693,7 @@ void CComponentsHeader::initVarHeader()
|
|||||||
cch_col_text = COL_MENUHEAD;
|
cch_col_text = COL_MENUHEAD;
|
||||||
cch_items_y = 0;
|
cch_items_y = 0;
|
||||||
cch_icon_x = 0;
|
cch_icon_x = 0;
|
||||||
|
cch_text_x = 0;
|
||||||
|
|
||||||
//CComponentsForm
|
//CComponentsForm
|
||||||
initVarForm();
|
initVarForm();
|
||||||
@@ -1741,7 +1742,7 @@ void CComponentsHeader::initCCHeaderIcon()
|
|||||||
|
|
||||||
void CComponentsHeader::initCCHeaderText()
|
void CComponentsHeader::initCCHeaderText()
|
||||||
{
|
{
|
||||||
int cch_text_x = cch_icon_x+cch_icon_obj->getWidth();
|
cch_text_x = cch_icon_x+cch_icon_obj->getWidth();
|
||||||
cch_text_obj = new CComponentsText(cch_text_x, cch_items_y, width-cch_icon_obj->getWidth()-fr_thickness, height-2*fr_thickness, cch_text.c_str());
|
cch_text_obj = new CComponentsText(cch_text_x, cch_items_y, width-cch_icon_obj->getWidth()-fr_thickness, height-2*fr_thickness, cch_text.c_str());
|
||||||
cch_text_obj->setTextFont(cch_font);
|
cch_text_obj->setTextFont(cch_font);
|
||||||
cch_text_obj->setTextColor(cch_col_text);
|
cch_text_obj->setTextColor(cch_col_text);
|
||||||
@@ -1762,10 +1763,10 @@ void CComponentsHeader::paint(bool do_save_bg)
|
|||||||
|
|
||||||
//init icon
|
//init icon
|
||||||
initCCHeaderIcon();
|
initCCHeaderIcon();
|
||||||
|
|
||||||
//init text
|
//init text
|
||||||
initCCHeaderText();
|
initCCHeaderText();
|
||||||
|
|
||||||
//add elements
|
//add elements
|
||||||
addCCItem(cch_icon_obj);
|
addCCItem(cch_icon_obj);
|
||||||
addCCItem(cch_text_obj);
|
addCCItem(cch_text_obj);
|
||||||
|
Reference in New Issue
Block a user