diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 4aed08e85..369c0e5de 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1536,8 +1536,8 @@ void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/) void CChannelList::showChannelLogo() { - static int logo_w = PIC_W; - static int logo_h = PIC_H; + static int logo_w = 0; + static int logo_h = 0; frameBuffer->paintBoxRel(x + width - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h, COL_MENUHEAD_PLUS_0); std::string lname; diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 80d476299..125ba0360 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -1185,16 +1185,22 @@ void CMovieBrowser::refreshMovieInfo(void) logo_ok = !access(fname.c_str(), F_OK); m_pcInfo->setText(&m_movieSelectionHandler->epgInfo2, logo_ok ? m_cBoxFrameInfo.iWidth-picw-20: 0); + static int logo_w = 0; + static int logo_h = 0; //printf("refreshMovieInfo: EpgId %llx id %llx y %d\n", m_movieSelectionHandler->epgEpgId, m_movieSelectionHandler->epgId, m_cBoxFrameTitleRel.iY); - int lx = m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX+m_cBoxFrameTitleRel.iWidth-PIC_W-10; - int ly = m_cBoxFrameTitleRel.iY+m_cBoxFrame.iY+ (m_cBoxFrameTitleRel.iHeight-PIC_H)/2; - m_pcWindow->paintBoxRel(lx, ly, PIC_W, PIC_H, TITLE_BACKGROUND_COLOR); + int lx = m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX+m_cBoxFrameTitleRel.iWidth-logo_w-10; + int ly = m_cBoxFrameTitleRel.iY+m_cBoxFrame.iY+ (m_cBoxFrameTitleRel.iHeight-logo_h)/2; + m_pcWindow->paintBoxRel(lx, ly, logo_w, logo_h, TITLE_BACKGROUND_COLOR); //g_PicViewer->DisplayLogo(m_movieSelectionHandler->epgEpgId >>16, lx, ly, PIC_W, PIC_H); std::string lname; - if(g_PicViewer->GetLogoName(m_movieSelectionHandler->epgEpgId >>16, m_movieSelectionHandler->epgChannel, lname)) - g_PicViewer->DisplayImage(lname, lx, ly, PIC_W, PIC_H); - + if(g_PicViewer->GetLogoName(m_movieSelectionHandler->epgEpgId >>16, m_movieSelectionHandler->epgChannel, lname, &logo_w, &logo_h)){ + if(logo_h > PIC_H) + logo_h = PIC_H; + lx = m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX+m_cBoxFrameTitleRel.iWidth-logo_w-10; + ly = m_cBoxFrameTitleRel.iY+m_cBoxFrame.iY+ (m_cBoxFrameTitleRel.iHeight-logo_h)/2; + g_PicViewer->DisplayImage(lname, lx, ly, logo_w, logo_h); + } if(logo_ok) { #if 0 lx = m_cBoxFrameInfo.iX+m_cBoxFrameInfo.iWidth - picw -10;