Origin commit data
------------------
Branch: ni/coolstream
Commit: a7c35a3373
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-04-22 (Sat, 22 Apr 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-04-22 10:35:44 +02:00
7 changed files with 231 additions and 74 deletions

View File

@@ -1691,35 +1691,16 @@ void CChannelList::paintAdditionals(int index)
}
}
void CChannelList::showChannelLogo() //TODO: move into an own handler, eg. header, channel logo should be paint inside header object
void CChannelList::showChannelLogo()
{
if ((*chanlist).empty())
return;
if(g_settings.channellist_show_channellogo){
int logo_w_max = full_width / 4;
int logo_h_max = theight - 2*OFFSET_INNER_MIN;
if (CChannelLogo) {
if (headerNew)
CChannelLogo->clearSavedScreen();
else
CChannelLogo->hide();
delete CChannelLogo;
}
CChannelLogo = new CComponentsChannelLogoScalable(0, 0, (*chanlist)[selected]->getName(), (*chanlist)[selected]->getChannelID());
if (CChannelLogo->hasLogo()){
CChannelLogo->setWidth(min(CChannelLogo->getWidth(), logo_w_max), true);
if (CChannelLogo->getHeight() > logo_h_max)
CChannelLogo->setHeight(logo_h_max, true);
CChannelLogo->setXPos(x + full_width - logo_off - CChannelLogo->getWidth());
CChannelLogo->setYPos(y + (theight - CChannelLogo->getHeight()) / 2);
CChannelLogo->paint();
} else {
CChannelLogo->hide();
delete CChannelLogo;
CChannelLogo = NULL;
}
headerNew = false;
header->setChannelLogo((*chanlist)[selected]->getChannelID(), (*chanlist)[selected]->getName());
header->getChannelLogoObject()->hide();
header->getChannelLogoObject()->clearSavedScreen();
header->getChannelLogoObject()->allowPaint(true);
header->getChannelLogoObject()->paint();
}
}
@@ -2198,7 +2179,14 @@ void CChannelList::paintHead()
else
logo_off = OFFSET_INNER_MID;
if(g_settings.channellist_show_channellogo){
//ensure to have clean background
header->getChannelLogoObject()->hide();
header->setChannelLogo((*chanlist)[selected]->getChannelID(), (*chanlist)[selected]->getName());
header->getChannelLogoObject()->allowPaint(false);
}
header->paint(CC_SAVE_SCREEN_NO);
showChannelLogo();
}
CComponentsHeader* CChannelList::getHeaderObject()