From 34d4dd445236befb6421f59802998faba0ab9ede Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 5 Feb 2016 09:05:37 +0100 Subject: [PATCH] CMovieBrowser: consider small cover images Should prevent oversized upscale of very small images. Maximal used size is the half height of epg box. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/fb0210801a09274b7452900ccc39ac4aea9c95c0 Author: Thilo Graf Date: 2016-02-05 (Fri, 05 Feb 2016) ------------------ This commit was generated by Migit --- src/gui/moviebrowser.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 3374a860a..09a005215 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -1395,6 +1395,10 @@ void CMovieBrowser::refreshMovieInfo(void) ly = m_cBoxFrameInfo.iY - 1 + (m_cBoxFrameInfo.iHeight-flogo_h)/2; if (pic == NULL){ //TODO: paint custom covers with different ratio, currently only works with default ratio 16/9 or 4/3 pic = new CComponentsPicture(lx+2, ly+1, fname, NULL, CC_SHADOW_OFF, COL_MENUCONTENTSELECTED_PLUS_0); + if (pic->getHeight() < flogo_h/2){ + flogo_h = flogo_h/2; + pic->setYPos(m_cBoxFrameInfo.iY - 1 + (m_cBoxFrameInfo.iHeight-flogo_h)/2); + } pic->setHeight(flogo_h, true); /*flogo_w*/ pic->enableFrame(true, 2); pic->enableCache();