diff --git a/src/gui/components/cc_frm.h b/src/gui/components/cc_frm.h index 210d2ffa9..1cb288cff 100644 --- a/src/gui/components/cc_frm.h +++ b/src/gui/components/cc_frm.h @@ -388,7 +388,10 @@ class CComponentsExtTextForm : public CComponentsForm ///assigns texts for label and text, parameter as string, parameter Font is optional for required font type, default font is dependently from defined item height void setLabelAndText(const std::string& label_text, const std::string& text, Font* font_text = NULL); + ///assigns texts for label and text, parameter as neutrino_locale_t, parameter Font is optional for required font type, default font is dependently from defined item height void setLabelAndText(const neutrino_locale_t& locale_label_text, const neutrino_locale_t& locale_text, Font* font_text = NULL); + ///assigns text Font type + void setLabelAndTextFont(Font* font); ///assigns texts for label and text, parameter as struct (locale_ext_txt_t), parameters provide the same properties like setLabelAndText() void setLabelAndTexts(const locale_ext_txt_t& texts); diff --git a/src/gui/components/cc_frm_ext_text.cpp b/src/gui/components/cc_frm_ext_text.cpp index 3d8cdfe48..33c4975b3 100644 --- a/src/gui/components/cc_frm_ext_text.cpp +++ b/src/gui/components/cc_frm_ext_text.cpp @@ -187,6 +187,13 @@ void CComponentsExtTextForm::setLabelAndTexts(const locale_ext_txt_t& locale_tex setLabelAndText(g_Locale->getText(locale_texts.label_text), g_Locale->getText(locale_texts.text), locale_texts.font); } +void CComponentsExtTextForm::setLabelAndTextFont(Font* font) +{ + if (font == NULL) + return; + setLabelAndText(ccx_label_text, ccx_text, font); +} + void CComponentsExtTextForm::setTextModes(const int& label_mode, const int& text_mode) { ccx_label_align = label_mode; @@ -203,7 +210,6 @@ void CComponentsExtTextForm::setLabelAndTextColor(const fb_pixel_t label_color , void CComponentsExtTextForm::initCCTextItems() { - height = max(height, ccx_font->getHeight()); initLabel(); initText(); }