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
------------------
Branch: ni/coolstream
Commit: f499efa208
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-10-12 (Sun, 12 Oct 2014)



------------------
This commit was generated by Migit
This commit is contained in:
2014-10-12 22:48:50 +02:00
parent 79b201d895
commit 7f7d7e57b5

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();