mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
moviebrowser: simplify channellogo scaling code
Origin commit data
------------------
Branch: ni/coolstream
Commit: 1590f4a276
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-11-08 (Tue, 08 Nov 2016)
Origin message was:
------------------
- moviebrowser: simplify channellogo scaling code
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1307,13 +1307,10 @@ void CMovieBrowser::refreshChannelLogo(void)
|
||||
|
||||
if (m_channelLogo && m_channelLogo->hasLogo())
|
||||
{
|
||||
// scale image if required, TODO: move into an own handler, eg. header, so channel logo should be paint in header object
|
||||
int h_logo = m_channelLogo->getHeight();
|
||||
if (h_logo > h_logo_max)
|
||||
{
|
||||
m_channelLogo->setWidth(0); // force recalculation
|
||||
// TODO: move into an own handler, eg. header, so channel logo should be paint in header object
|
||||
m_channelLogo->setWidth(min(m_channelLogo->getWidth(), w_logo_max), true);
|
||||
if (m_channelLogo->getHeight() > h_logo_max)
|
||||
m_channelLogo->setHeight(h_logo_max, true);
|
||||
}
|
||||
|
||||
int x = m_cBoxFrame.iX + m_cBoxFrameTitleRel.iX + m_cBoxFrameTitleRel.iWidth - m_channelLogo->getWidth() - OFFSET_INNER_MID;
|
||||
int y = m_cBoxFrame.iY + m_cBoxFrameTitleRel.iY + (m_cBoxFrameTitleRel.iHeight - m_channelLogo->getHeight())/2;
|
||||
|
Reference in New Issue
Block a user