From d79f6177ebe5cf0b79f616c7fe77b310c16c076f Mon Sep 17 00:00:00 2001 From: satbaby Date: Sun, 9 May 2010 17:09:45 +0000 Subject: [PATCH] ppattch for width logos git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@575 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/channellist.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 29920cc35..4aed08e85 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1536,11 +1536,17 @@ void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/) void CChannelList::showChannelLogo() { - frameBuffer->paintBoxRel(x + width - logo_off - PIC_W, y+(theight-PIC_H)/2, PIC_W, PIC_H, COL_MENUHEAD_PLUS_0); + static int logo_w = PIC_W; + static int logo_h = PIC_H; + frameBuffer->paintBoxRel(x + 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]->name, lname)) - g_PicViewer->DisplayImage(lname, x + width - logo_off - PIC_W, y+(theight-PIC_H)/2, PIC_W, PIC_H); + if(g_PicViewer->GetLogoName(chanlist[selected]->channel_id, chanlist[selected]->name, lname, &logo_w, &logo_h)){ + if(logo_h > PIC_H) + logo_h = PIC_H; + + g_PicViewer->DisplayImage(lname, x + width - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h); + } } void CChannelList::paintItem(int pos)