Merge branch 'cst-next.pre' into cst-next

This commit is contained in:
2015-04-30 09:20:43 +02:00
81 changed files with 909 additions and 477 deletions

View File

@@ -1681,9 +1681,16 @@ void CChannelList::showChannelLogo()
CChannelLogo->hide();
delete CChannelLogo;
}
CChannelLogo = new CComponentsChannelLogo(0, 0, logo_w_max, theight,
(*chanlist)[selected]->getName(), (*chanlist)[selected]->channel_id);
if (CChannelLogo->hasLogo()) {
CChannelLogo = new CComponentsChannelLogoScalable(0, 0, (*chanlist)[selected]->getName(), (*chanlist)[selected]->channel_id);
if (CChannelLogo->hasLogo()){
int h_logo = CChannelLogo->getHeight();
if (h_logo > theight){ //scale image if required, TODO: move into an own handler, eg. header, so channel logo should be paint in header object
uint8_t h_ratio = uint8_t(theight*100/h_logo);
CChannelLogo->setHeight(theight);
int w_logo = h_ratio*CChannelLogo->getWidth()/100;
CChannelLogo->setWidth(min(w_logo, logo_w_max));
}
CChannelLogo->setXPos(x + full_width - logo_off - CChannelLogo->getWidth());
CChannelLogo->setYPos(y + (theight - CChannelLogo->getHeight()) / 2);
CChannelLogo->paint();
@@ -2061,7 +2068,7 @@ void CChannelList::paint()
void CChannelList::paintHead()
{
static int gradient = g_settings.gradiant;
static int gradient = g_settings.theme.menu_Head_gradient;
CComponentsHeader header(x, y, full_width, theight, name /*no header icon*/);
if (bouquet && bouquet->zapitBouquet && bouquet->zapitBouquet->bLocked != g_settings.parentallock_defaultlocked)
@@ -2071,8 +2078,8 @@ void CChannelList::paintHead()
header.paint(CC_SAVE_SCREEN_NO);
if (gradient != g_settings.gradiant && headerClock != NULL) {
gradient = g_settings.gradiant;
if (gradient != g_settings.theme.menu_Head_gradient && headerClock != NULL) {
gradient = g_settings.theme.menu_Head_gradient;
headerClock->clearSavedScreen();
delete headerClock;
headerClock = NULL;