CChannelList: ensure down scaling if header height is too small

Logo is initialized with width and height, but enforces in most cases
upscaling of logo. Default now disabled scaling but if header too small,
down scaling is enabled.
This commit is contained in:
2014-10-12 22:48:50 +02:00
parent c027412832
commit f499efa208

View File

@@ -1666,6 +1666,7 @@ void CChannelList::showChannelLogo()
CChannelLogo = new CComponentsChannelLogo(0, 0, logo_w_max, theight, CChannelLogo = new CComponentsChannelLogo(0, 0, logo_w_max, theight,
(*chanlist)[selected]->getName(), (*chanlist)[selected]->channel_id); (*chanlist)[selected]->getName(), (*chanlist)[selected]->channel_id);
if (CChannelLogo->hasLogo()) { if (CChannelLogo->hasLogo()) {
CChannelLogo->doScale(theight < CChannelLogo->getHeight());
CChannelLogo->setXPos(x + full_width - logo_off - CChannelLogo->getWidth()); CChannelLogo->setXPos(x + full_width - logo_off - CChannelLogo->getWidth());
CChannelLogo->setYPos(y + (theight - CChannelLogo->getHeight()) / 2); CChannelLogo->setYPos(y + (theight - CChannelLogo->getHeight()) / 2);
CChannelLogo->paint(); CChannelLogo->paint();