mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
CEpgData: supplement to 'fix header size'
commit: 7583714e6703a7ae9591e112726759c4070d0c68 Permanent font init is required to avoid possible crash after changed font settings by user.
This commit is contained in:
@@ -132,7 +132,7 @@ CEpgData::CEpgData()
|
|||||||
lText = NULL;
|
lText = NULL;
|
||||||
rText = NULL;
|
rText = NULL;
|
||||||
pb = NULL;
|
pb = NULL;
|
||||||
font_title = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE];
|
font_title = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CEpgData::~CEpgData()
|
CEpgData::~CEpgData()
|
||||||
@@ -145,6 +145,7 @@ void CEpgData::start()
|
|||||||
ox = frameBuffer->getScreenWidthRel(bigFonts ? false /* big */ : true /* small */);
|
ox = frameBuffer->getScreenWidthRel(bigFonts ? false /* big */ : true /* small */);
|
||||||
oy = frameBuffer->getScreenHeightRel(bigFonts ? false /* big */ : true /* small */);
|
oy = frameBuffer->getScreenHeightRel(bigFonts ? false /* big */ : true /* small */);
|
||||||
|
|
||||||
|
font_title = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE];
|
||||||
topheight = font_title->getHeight();
|
topheight = font_title->getHeight();
|
||||||
topboxheight = topheight + 6;
|
topboxheight = topheight + 6;
|
||||||
botboxheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getHeight() + 6;
|
botboxheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getHeight() + 6;
|
||||||
@@ -849,13 +850,13 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
|||||||
// header + logo
|
// header + logo
|
||||||
if (!header){
|
if (!header){
|
||||||
header = new CComponentsHeader(sx, sy, ox, toph);
|
header = new CComponentsHeader(sx, sy, ox, toph);
|
||||||
header->setCaptionFont(font_title);
|
|
||||||
header->setColorBody(COL_MENUHEAD_PLUS_0);
|
header->setColorBody(COL_MENUHEAD_PLUS_0);
|
||||||
header->enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_MENUCONTENT_PLUS_0, g_settings.theme.menu_Head_gradient_direction);
|
header->enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_MENUCONTENT_PLUS_0, g_settings.theme.menu_Head_gradient_direction);
|
||||||
header->enableClock(true, "%H:%M", "%H %M", true);
|
header->enableClock(true, "%H:%M", "%H %M", true);
|
||||||
}else
|
}else
|
||||||
header->setDimensionsAll(sx, sy, ox, toph);
|
header->setDimensionsAll(sx, sy, ox, toph);
|
||||||
|
|
||||||
|
header->setCaptionFont(font_title);
|
||||||
header->setCaption(epgData.title);
|
header->setCaption(epgData.title);
|
||||||
|
|
||||||
if (header->isPainted())
|
if (header->isPainted())
|
||||||
|
Reference in New Issue
Block a user