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.


Origin commit data
------------------
Commit: f499efa208
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-10-12 (Sun, 12 Oct 2014)
This commit is contained in:
2014-10-12 22:48:50 +02:00
parent b021ee0e81
commit e7b404abb9

View File

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