mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
Enable gradient for all remaining GUI header
Origin commit data
------------------
Branch: ni/coolstream
Commit: b9400110b4
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-10-16 (Thu, 16 Oct 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -445,6 +445,7 @@ bool CEpgData::isCurrentEPG(const t_channel_id channel_id)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_startzeit, bool doLoop, bool callFromfollowlist )
|
||||
{
|
||||
int res = menu_return::RETURN_REPAINT;
|
||||
@@ -455,6 +456,10 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
startzeit=*a_startzeit;
|
||||
id=a_id;
|
||||
|
||||
CComponentsHeader* header = NULL;
|
||||
CComponentsPicture* headerPic = NULL;
|
||||
CComponentsText* headerText = NULL;
|
||||
|
||||
int height = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getHeight();
|
||||
|
||||
GetEPGData(channel_id, id, &startzeit );
|
||||
@@ -486,8 +491,9 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(channel_id);
|
||||
if(channel) {
|
||||
if(g_settings.infobar_show_channellogo && g_PicViewer->GetLogoName(channel_id, channel->getName(), lname, &logo_w, &logo_h)) {
|
||||
if((logo_h > toph) || (logo_w > logo_w_max))
|
||||
g_PicViewer->rescaleImageDimensions(&logo_w, &logo_h, logo_w_max, toph);
|
||||
if((logo_h > (toph-4)) || (logo_w > logo_w_max)) {
|
||||
g_PicViewer->rescaleImageDimensions(&logo_w, &logo_h, logo_w_max, toph-4);
|
||||
}
|
||||
pic_offx = logo_w + 10;
|
||||
}
|
||||
}
|
||||
@@ -620,21 +626,25 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
has_follow_screenings = true;
|
||||
}
|
||||
|
||||
|
||||
COSDFader fader(g_settings.theme.menu_Content_alpha);
|
||||
fader.StartFadeIn();
|
||||
|
||||
//show the epg
|
||||
frameBuffer->paintBoxRel(sx, sy, ox, toph, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);
|
||||
|
||||
//show the logo
|
||||
if (pic_offx > 0)
|
||||
g_PicViewer->DisplayImage(lname, sx+10, sy + (toph-logo_h)/2, logo_w, logo_h);
|
||||
|
||||
//show the title
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]->RenderString(sx+15 + pic_offx, sy + topheight+ 3, ox-15- pic_offx, text1, COL_MENUHEAD_TEXT);
|
||||
if (!(text2.empty()))
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]->RenderString(sx+15+ pic_offx, sy+ 2* topheight+ 3, ox-15 - pic_offx, text2, COL_MENUHEAD_TEXT);
|
||||
// header + logo
|
||||
int header_h = std::max(toph, logo_h);
|
||||
header = new CComponentsHeader(sx, sy, ox, header_h);
|
||||
if (pic_offx > 0) {
|
||||
headerPic = new CComponentsPicture(sx+10, sy + (toph-logo_h)/2, logo_w, logo_h, lname);
|
||||
headerPic->doPaintBg(false);
|
||||
}
|
||||
std::string textAll = (text2 != "") ? text1 + "\n" + text2 : text1;
|
||||
headerText = new CComponentsText(sx+15+pic_offx, sy, ox-15-pic_offx, header_h, textAll, CTextBox::NO_AUTO_LINEBREAK, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]);
|
||||
headerText->doPaintBg(false);
|
||||
headerText->setTextColor(COL_MENUHEAD_TEXT);
|
||||
header->paint(CC_SAVE_SCREEN_NO);
|
||||
headerText->paint(CC_SAVE_SCREEN_NO);
|
||||
if (headerPic)
|
||||
headerPic->paint(CC_SAVE_SCREEN_NO);
|
||||
|
||||
//show date-time....
|
||||
frameBuffer->paintBoxRel(sx, sy+oy-botboxheight, ox, botboxheight, COL_MENUHEAD_PLUS_0);
|
||||
@@ -974,6 +984,13 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
hide();
|
||||
fader.StopFade();
|
||||
}
|
||||
if (headerPic)
|
||||
delete headerPic;
|
||||
if (headerText)
|
||||
delete headerText;
|
||||
if (header)
|
||||
delete header;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user