mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
CComponentsHeader: declare l_font, s_font as global
Useful for init in header sub classes. So its possible to use other prefined size mode fonts
This commit is contained in:
@@ -96,6 +96,8 @@ void CComponentsHeader::initVarHeader( const int& x_pos, const int& y_pos, const
|
|||||||
height = height_old = h;
|
height = height_old = h;
|
||||||
|
|
||||||
cch_font = NULL;
|
cch_font = NULL;
|
||||||
|
l_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE];
|
||||||
|
s_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU];
|
||||||
cch_size_mode = CC_HEADER_SIZE_LARGE;
|
cch_size_mode = CC_HEADER_SIZE_LARGE;
|
||||||
CNeutrinoApp::getInstance()->OnAfterSetupFonts.connect(sigc::mem_fun(this, &CComponentsHeader::resetFont));
|
CNeutrinoApp::getInstance()->OnAfterSetupFonts.connect(sigc::mem_fun(this, &CComponentsHeader::resetFont));
|
||||||
|
|
||||||
@@ -172,9 +174,6 @@ void CComponentsHeader::resetFont()
|
|||||||
|
|
||||||
void CComponentsHeader::initCaptionFont()
|
void CComponentsHeader::initCaptionFont()
|
||||||
{
|
{
|
||||||
Font *l_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE];
|
|
||||||
Font *s_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU];
|
|
||||||
|
|
||||||
if (cch_font == NULL){
|
if (cch_font == NULL){
|
||||||
cch_font = (cch_size_mode == CC_HEADER_SIZE_LARGE? l_font : s_font);
|
cch_font = (cch_size_mode == CC_HEADER_SIZE_LARGE? l_font : s_font);
|
||||||
//select matching height
|
//select matching height
|
||||||
|
@@ -67,7 +67,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen
|
|||||||
///property: caption text color, see also setCaptionColor()
|
///property: caption text color, see also setCaptionColor()
|
||||||
fb_pixel_t cch_col_text;
|
fb_pixel_t cch_col_text;
|
||||||
///property: caption font, see also setCaptionFont()
|
///property: caption font, see also setCaptionFont()
|
||||||
Font* cch_font;
|
Font* cch_font, *l_font, *s_font;
|
||||||
///reset font
|
///reset font
|
||||||
void resetFont();
|
void resetFont();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user