diff options
author | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2014-03-11 20:33:58 +0100 |
---|---|---|
committer | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2014-03-11 20:33:58 +0100 |
commit | d15b59582da7115def27ab32fa239a5dcabadec1 (patch) | |
tree | 717ff1f980e3d72e3b35b3c2d2f1d5c268bfffc7 | |
parent | be360f1cd8a503cb1fd63573f96f02a52d87d2aa (diff) | |
download | skin-flatplus-d15b59582da7115def27ab32fa239a5dcabadec1.tar.gz skin-flatplus-d15b59582da7115def27ab32fa239a5dcabadec1.tar.bz2 |
update channel background logo position
-rw-r--r-- | baserender.c | 9 | ||||
-rw-r--r-- | displaychannel.c | 5 | ||||
-rw-r--r-- | displaymenu.c | 11 |
3 files changed, 18 insertions, 7 deletions
diff --git a/baserender.c b/baserender.c index 4c290676..f894892a 100644 --- a/baserender.c +++ b/baserender.c @@ -211,17 +211,22 @@ void cFlatBaseRender::TopBarUpdate(void) { } if( topBarMenuLogoSet && Config.TopBarMenuIconShow ) { + topBarIconPixmap->Fill(clrTransparent); int IconLeft = marginItem; + int imageBGWidth = 999; + int imageBGHeight = topBarHeight - marginItem*2; cImage *imgBG = imgLoader.LoadIcon("logo_background", 999, topBarHeight - marginItem*2); if( imgBG ) { int iconTop = (topBarHeight / 2 - imgBG->Height()/2); + imageBGHeight = imgBG->Height(); + imageBGWidth = imgBG->Width(); topBarIconBGPixmap->DrawImage( cPoint(IconLeft, iconTop), *imgBG ); } - cImage *img = imgLoader.LoadLogo(*topBarMenuLogo, 999, topBarHeight - marginItem*2); + cImage *img = imgLoader.LoadLogo(*topBarMenuLogo, imageBGWidth, imageBGHeight); if( img ) { - int iconTop = (topBarHeight / 2 - img->Height()/2); + int iconTop = (imageBGHeight - img->Height())/2; topBarIconPixmap->DrawImage(cPoint(IconLeft, iconTop), *img); MenuIconWidth = img->Width()+marginItem*2; TitleWidthLeft -= MenuIconWidth + marginItem*3; diff --git a/displaychannel.c b/displaychannel.c index 4738518b..a2d007c7 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -122,25 +122,30 @@ void cFlatDisplayChannel::SetChannel(const cChannel *Channel, int Number) { chanLogoPixmap->Fill(clrTransparent); chanLogoBGPixmap->Fill(clrTransparent); int imageHeight = heightImageLogo - marginItem*2; + int imageBGHeight = imageHeight; int imageLeft = marginItem*2; int imageTop = marginItem; cImage *imgBG = imgLoader.LoadIcon("logo_background", imageHeight, imageHeight); if( imgBG ) { + imageBGHeight = imgBG->Height(); chanLogoBGPixmap->DrawImage( cPoint(imageLeft, imageTop), *imgBG ); } cImage *img = imgLoader.LoadLogo(*channelName, imageHeight, imageHeight); if( img ) { + imageTop = marginItem + (imageBGHeight - img->Height()) / 2; chanLogoPixmap->DrawImage( cPoint(imageLeft, imageTop), *img ); } else if( !isGroup ) { // draw default logo if( isRadioChannel ) { img = imgLoader.LoadIcon("radio", imageHeight, imageHeight); if( img ) { + imageTop = marginItem + (imageHeight - img->Height()) / 2; chanLogoPixmap->DrawImage( cPoint(imageLeft, imageTop), *img ); } } else { img = imgLoader.LoadIcon("tv", imageHeight, imageHeight); if( img ) { + imageTop = marginItem + (imageHeight - img->Height()) / 2; chanLogoPixmap->DrawImage( cPoint(imageLeft, imageTop), *img ); } } diff --git a/displaymenu.c b/displaymenu.c index 0fe9ca8d..3c7d2eec 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -1211,12 +1211,13 @@ bool cFlatDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current } Left += w + marginItem; - cImage *imgBG = imgLoader.LoadIcon("logo_background", fontHeight, fontHeight); - if( imgBG ) { - imageTop = Top + (fontHeight - imgBG->Height()) / 2; - menuIconsBGPixmap->DrawImage( cPoint(Left, imageTop), *imgBG ); + if( !Channel->GroupSep() ) { + cImage *imgBG = imgLoader.LoadIcon("logo_background", fontHeight, fontHeight); + if( imgBG ) { + imageTop = Top + (fontHeight - imgBG->Height()) / 2; + menuIconsBGPixmap->DrawImage( cPoint(Left, imageTop), *imgBG ); + } } - img = imgLoader.LoadLogo(Channel->Name(), fontHeight, fontHeight); if( img ) { imageTop = Top + (fontHeight - img->Height()) / 2; |