CComponentsHeader: add possibility to change font in header class

Origin commit data
------------------
Commit: 890d282315
Author: vanhofen <vanhofen@gmx.de>
Date: 2013-05-28 (Tue, 28 May 2013)

Origin message was:
------------------
- CComponentsHeader: add possibility to change font in header class
This commit is contained in:
vanhofen
2013-05-28 10:24:23 +02:00
parent ceec88cca1
commit 5a164116d1
2 changed files with 9 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ CComponentsHeader::CComponentsHeader( const int x_pos, const int y_pos, const in
x = x_pos;
y = y_pos;
width = w;
height = h > 0 ? h : g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
height = h > 0 ? h : height;
shadow = has_shadow;
col_frame = color_frame;
col_body = color_body;
@@ -74,7 +74,7 @@ CComponentsHeader::CComponentsHeader( const int x_pos, const int y_pos, const in
x = x_pos;
y = y_pos;
width = w;
height = h;
height = h > 0 ? h : height;
shadow = has_shadow;
col_frame = color_frame;
col_body = color_body;
@@ -139,6 +139,12 @@ void CComponentsHeader::setCaption(neutrino_locale_t caption_locale)
cch_text = g_Locale->getText(caption_locale);
}
void CComponentsHeader::setCaptionFont(Font* font_name)
{
cch_font = font_name;
height = std::max(height, cch_font->getHeight());
}
void CComponentsHeader::setIcon(const char* icon_name)
{
cch_icon_name = icon_name;