mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
- CComponentsHeader: add possibility to change font in header class
This commit is contained in:
@@ -148,6 +148,7 @@ class CComponentsHeader : public CComponentsForm
|
|||||||
|
|
||||||
virtual void setCaption(const std::string& caption);
|
virtual void setCaption(const std::string& caption);
|
||||||
virtual void setCaption(neutrino_locale_t caption_locale);
|
virtual void setCaption(neutrino_locale_t caption_locale);
|
||||||
|
virtual void setCaptionFont(Font* font_name);
|
||||||
virtual void setCaptionColor(fb_pixel_t text_color){cch_col_text = text_color;};
|
virtual void setCaptionColor(fb_pixel_t text_color){cch_col_text = text_color;};
|
||||||
virtual void setButtonOffset(const int offset){cch_btn_offset = offset;};
|
virtual void setButtonOffset(const int offset){cch_btn_offset = offset;};
|
||||||
virtual void setIcon(const char* icon_name);
|
virtual void setIcon(const char* icon_name);
|
||||||
|
@@ -51,7 +51,7 @@ CComponentsHeader::CComponentsHeader( const int x_pos, const int y_pos, const in
|
|||||||
x = x_pos;
|
x = x_pos;
|
||||||
y = y_pos;
|
y = y_pos;
|
||||||
width = w;
|
width = w;
|
||||||
height = h > 0 ? h : g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
|
height = h > 0 ? h : height;
|
||||||
shadow = has_shadow;
|
shadow = has_shadow;
|
||||||
col_frame = color_frame;
|
col_frame = color_frame;
|
||||||
col_body = color_body;
|
col_body = color_body;
|
||||||
@@ -74,7 +74,7 @@ CComponentsHeader::CComponentsHeader( const int x_pos, const int y_pos, const in
|
|||||||
x = x_pos;
|
x = x_pos;
|
||||||
y = y_pos;
|
y = y_pos;
|
||||||
width = w;
|
width = w;
|
||||||
height = h;
|
height = h > 0 ? h : height;
|
||||||
shadow = has_shadow;
|
shadow = has_shadow;
|
||||||
col_frame = color_frame;
|
col_frame = color_frame;
|
||||||
col_body = color_body;
|
col_body = color_body;
|
||||||
@@ -139,6 +139,12 @@ void CComponentsHeader::setCaption(neutrino_locale_t caption_locale)
|
|||||||
cch_text = g_Locale->getText(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)
|
void CComponentsHeader::setIcon(const char* icon_name)
|
||||||
{
|
{
|
||||||
cch_icon_name = icon_name;
|
cch_icon_name = icon_name;
|
||||||
|
Reference in New Issue
Block a user