From a1a89b92a6959403db6fdb9e3f5f4a062840a91e Mon Sep 17 00:00:00 2001 From: micha-bbg Date: Tue, 29 Nov 2011 13:12:34 +0000 Subject: [PATCH] Complement to revision r1869 git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1924 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/eventlist.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 7d70b709f..1196f4741 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -867,13 +867,10 @@ void EventList::paintHead(t_channel_id _channel_id, std::string _channelname) std::string lname; int logo_w = 0; int logo_h = 0; + int logo_w_max = width / 4; if(g_settings.infobar_show_channellogo && g_PicViewer->GetLogoName(_channel_id, _channelname, 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); logo_ok = g_PicViewer->DisplayImage(lname, x+10, y+(theight-logo_h)/2, logo_w, logo_h); } else