mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +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;
|
cc_minitv = NULL;
|
||||||
logo_off = 0;
|
logo_off = 0;
|
||||||
pig_on_win = false;
|
pig_on_win = false;
|
||||||
|
CChannelLogo = NULL;
|
||||||
//printf("************ NEW LIST %s : %x\n", name.c_str(), (int) this);fflush(stdout);
|
//printf("************ NEW LIST %s : %x\n", name.c_str(), (int) this);fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,6 +142,11 @@ CChannelList::~CChannelList()
|
|||||||
if (headerClock->isClockRun())
|
if (headerClock->isClockRun())
|
||||||
headerClock->stopThread();
|
headerClock->stopThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CChannelLogo) {
|
||||||
|
delete CChannelLogo;
|
||||||
|
CChannelLogo = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void CChannelList::ClearList(void)
|
void CChannelList::ClearList(void)
|
||||||
{
|
{
|
||||||
@@ -1766,19 +1772,16 @@ void CChannelList::paintItem2DetailsLine (int pos)
|
|||||||
void CChannelList::showChannelLogo()
|
void CChannelList::showChannelLogo()
|
||||||
{
|
{
|
||||||
if(g_settings.channellist_show_channellogo){
|
if(g_settings.channellist_show_channellogo){
|
||||||
static int logo_w = 0;
|
|
||||||
static int logo_h = 0;
|
|
||||||
int logo_w_max = full_width / 4;
|
int logo_w_max = full_width / 4;
|
||||||
|
if (CChannelLogo) {
|
||||||
if (logo_w && logo_h)
|
CChannelLogo->hide();
|
||||||
frameBuffer->paintBoxRel(x + full_width - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h, COL_MENUHEAD_PLUS_0);
|
delete CChannelLogo;
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -104,6 +104,8 @@ private:
|
|||||||
|
|
||||||
int ChannelList_Rec;
|
int ChannelList_Rec;
|
||||||
|
|
||||||
|
CComponentsChannelLogo* CChannelLogo;
|
||||||
|
|
||||||
void paintDetails(int index);
|
void paintDetails(int index);
|
||||||
void clearItem2DetailsLine ();
|
void clearItem2DetailsLine ();
|
||||||
void paintItem2DetailsLine (int pos);
|
void paintItem2DetailsLine (int pos);
|
||||||
|
Reference in New Issue
Block a user