diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 9f772a66c..15c6b1251 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -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(); } } diff --git a/src/gui/channellist.h b/src/gui/channellist.h index ad9e61ff9..273c23023 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -104,6 +104,8 @@ private: int ChannelList_Rec; + CComponentsChannelLogo* CChannelLogo; + void paintDetails(int index); void clearItem2DetailsLine (); void paintItem2DetailsLine (int pos);