mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
CChannelList: Use CComponentsChannelLogo for display channellogo
Origin commit data
------------------
Branch: ni/coolstream
Commit: 2ecd9918cb
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-06-28 (Sat, 28 Jun 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -119,6 +119,7 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl
|
||||
cc_minitv = NULL;
|
||||
logo_off = 0;
|
||||
pig_on_win = false;
|
||||
CChannelLogo = NULL;
|
||||
//printf("************ NEW LIST %s : %x\n", name.c_str(), (int) this);fflush(stdout);
|
||||
}
|
||||
|
||||
@@ -141,6 +142,11 @@ CChannelList::~CChannelList()
|
||||
if (headerClock->isClockRun())
|
||||
headerClock->stopThread();
|
||||
}
|
||||
|
||||
if (CChannelLogo) {
|
||||
delete CChannelLogo;
|
||||
CChannelLogo = NULL;
|
||||
}
|
||||
}
|
||||
void CChannelList::ClearList(void)
|
||||
{
|
||||
@@ -1766,19 +1772,16 @@ void CChannelList::paintItem2DetailsLine (int pos)
|
||||
void CChannelList::showChannelLogo()
|
||||
{
|
||||
if(g_settings.channellist_show_channellogo){
|
||||
static int logo_w = 0;
|
||||
static int logo_h = 0;
|
||||
int logo_w_max = full_width / 4;
|
||||
|
||||
if (logo_w && logo_h)
|
||||
frameBuffer->paintBoxRel(x + full_width - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h, COL_MENUHEAD_PLUS_0);
|
||||
|
||||
std::string lname;
|
||||
if(g_PicViewer->GetLogoName(chanlist[selected]->channel_id, chanlist[selected]->getName(), lname, &logo_w, &logo_h)) {
|
||||
if((logo_h > theight) || (logo_w > logo_w_max))
|
||||
g_PicViewer->rescaleImageDimensions(&logo_w, &logo_h, logo_w_max, theight);
|
||||
g_PicViewer->DisplayImage(lname, x + full_width - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h);
|
||||
if (CChannelLogo) {
|
||||
CChannelLogo->hide();
|
||||
delete CChannelLogo;
|
||||
}
|
||||
CChannelLogo = new CComponentsChannelLogo(0, 0, logo_w_max, theight,
|
||||
chanlist[selected]->getName(), chanlist[selected]->channel_id);
|
||||
CChannelLogo->setXPos(x + full_width - logo_off - CChannelLogo->getWidth());
|
||||
CChannelLogo->setYPos(y + (theight - CChannelLogo->getHeight()) / 2);
|
||||
CChannelLogo->paint();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user