Moviebrowser: Use real image width for calculating text width epgInfo2

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2159 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 1136e87ce5
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2012-03-23 (Fri, 23 Mar 2012)

Origin message was:
------------------
* Moviebrowser: Use real image width for calculating text width epgInfo2

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2159 e54a6e83-5905-42d5-8d5c-058d10e6a962


------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2012-03-23 19:40:18 +00:00
parent d67b3ca82b
commit 57ae37754a

View File

@@ -1228,8 +1228,13 @@ void CMovieBrowser::refreshMovieInfo(void)
int pich = m_cBoxFrameInfo.iHeight;
std::string fname = getScreenshotName(m_movieSelectionHandler->file.Name);
logo_ok = (fname != "");
int flogo_w = 0, flogo_h = 0;
if(logo_ok) {
g_PicViewer->getSize(fname.c_str(), &flogo_w, &flogo_h);
g_PicViewer->rescaleImageDimensions(&flogo_w, &flogo_h, picw-2, pich-2);
}
m_pcInfo->setText(&m_movieSelectionHandler->epgInfo2, logo_ok ? m_cBoxFrameInfo.iWidth-flogo_w-20 : 0);
m_pcInfo->setText(&m_movieSelectionHandler->epgInfo2, logo_ok ? m_cBoxFrameInfo.iWidth-picw-20: 0);
static int logo_w = 0;
static int logo_h = 0;
int logo_w_max = m_cBoxFrameTitleRel.iWidth / 4;
@@ -1248,9 +1253,6 @@ void CMovieBrowser::refreshMovieInfo(void)
g_PicViewer->DisplayImage(lname, lx - pb_hdd_offset, ly, logo_w, logo_h);
}
if(logo_ok) {
int flogo_w = 0, flogo_h = 0;
g_PicViewer->getSize(fname.c_str(), &flogo_w, &flogo_h);
g_PicViewer->rescaleImageDimensions(&flogo_w, &flogo_h, picw-2, pich-2);
lx = m_cBoxFrameInfo.iX+m_cBoxFrameInfo.iWidth - flogo_w -14;
ly = m_cBoxFrameInfo.iY - 1 + (m_cBoxFrameInfo.iHeight-flogo_h)/2;
g_PicViewer->DisplayImage(fname, lx+2, ly+1, flogo_w, flogo_h, CFrameBuffer::TM_NONE);