CComponentsExtTextForm: add member setLabelAndTextFont()

Origin commit data
------------------
Commit: a0e00387b6
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-11-07 (Thu, 07 Nov 2013)
This commit is contained in:
2013-11-07 16:24:44 +01:00
parent 689fa0a4b0
commit 07454cd891
2 changed files with 10 additions and 1 deletions

View File

@@ -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);

View File

@@ -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();
}