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


Origin commit data
------------------
Commit: 4f4f46a912
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2011-11-22 (Tue, 22 Nov 2011)
This commit is contained in:
Michael Liebmann
2011-11-21 23:11:52 +00:00
parent 250ebc278c
commit 971c3d4fb3
6 changed files with 44 additions and 57 deletions

View File

@@ -489,15 +489,12 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
std::string lname;
int logo_w = 0;
int logo_h = 0;
int logo_w_max = ox / 4;
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(channel_id);
if(channel) {
if(g_settings.infobar_show_channellogo && g_PicViewer->GetLogoName(channel_id, channel->getName(), lname, &logo_w, &logo_h)) {
if(logo_h > toph){
if((toph/(logo_h-toph))>1){
logo_w -= (logo_w/(toph/(logo_h-toph)));
}
logo_h = toph;
}
if((logo_h > toph) || (logo_w > logo_w_max))
g_PicViewer->rescaleImageDimensions(&logo_w, &logo_h, logo_w_max, toph);
pic_offx = logo_w + 10;
}
}