Correct calculation of the size of logo in list header.

- Function for calculating from infoviewer.cpp to pictureviewer.cpp moved
- Correct calculation in channellist.cpp, epgview.cpp and moviebrowser.cpp


git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1869 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
micha-bbg
2011-11-21 23:11:52 +00:00
parent 7d8651d1f7
commit 4f4f46a912
6 changed files with 44 additions and 57 deletions

View File

@@ -1771,16 +1771,13 @@ void CChannelList::showChannelLogo()
if(g_settings.infobar_show_channellogo){
static int logo_w = 0;
static int logo_h = 0;
int logo_w_max = width / 4;
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, &logo_w, &logo_h)) {
if(logo_h > theight) {
if((theight/(logo_h-theight))>1) {
logo_w -= (logo_w/(theight/(logo_h-theight)));
}
logo_h = theight;
}
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 + width - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h);
}
}