mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
- cc_frm_header: fix neutrino locales in CComponentsHeader
This commit is contained in:
@@ -105,7 +105,7 @@ void CComponentsHeader::initVarHeader()
|
|||||||
cch_text_obj = NULL;
|
cch_text_obj = NULL;
|
||||||
cch_icon_name = NULL;
|
cch_icon_name = NULL;
|
||||||
cch_btn_obj = NULL;
|
cch_btn_obj = NULL;
|
||||||
cch_text = "header";
|
cch_text = "";
|
||||||
cch_locale_text = NONEXISTANT_LOCALE;
|
cch_locale_text = NONEXISTANT_LOCALE;
|
||||||
cch_col_text = COL_MENUHEAD;
|
cch_col_text = COL_MENUHEAD;
|
||||||
cch_items_y = 0;
|
cch_items_y = 0;
|
||||||
@@ -136,7 +136,7 @@ void CComponentsHeader::setHeaderText(const std::string& caption)
|
|||||||
|
|
||||||
void CComponentsHeader::setHeaderText(neutrino_locale_t caption_locale)
|
void CComponentsHeader::setHeaderText(neutrino_locale_t caption_locale)
|
||||||
{
|
{
|
||||||
cch_text = g_Locale->getText(caption_locale);
|
cch_locale_text = caption_locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsHeader::setHeaderIcon(const char* icon_name)
|
void CComponentsHeader::setHeaderIcon(const char* icon_name)
|
||||||
@@ -285,6 +285,9 @@ void CComponentsHeader::initCCHeaderText()
|
|||||||
|
|
||||||
//set header text properties
|
//set header text properties
|
||||||
if (cch_text_obj){
|
if (cch_text_obj){
|
||||||
|
if (cch_locale_text != NONEXISTANT_LOCALE)
|
||||||
|
cch_text_obj->setText(cch_locale_text, CTextBox::AUTO_WIDTH, cch_font);
|
||||||
|
else
|
||||||
cch_text_obj->setText(cch_text, CTextBox::AUTO_WIDTH, cch_font);
|
cch_text_obj->setText(cch_text, CTextBox::AUTO_WIDTH, cch_font);
|
||||||
cch_text_obj->forceTextPaint(); //here required
|
cch_text_obj->forceTextPaint(); //here required
|
||||||
cch_text_obj->setDimensionsAll(cch_text_x, cch_items_y, width-cch_icon_w-fr_thickness, height-2*fr_thickness);
|
cch_text_obj->setDimensionsAll(cch_text_x, cch_items_y, width-cch_icon_w-fr_thickness, height-2*fr_thickness);
|
||||||
|
Reference in New Issue
Block a user