From c5f863439a16f8189b308f3eee2917e9c0ff9999 Mon Sep 17 00:00:00 2001 From: Martin Schirrmacher Date: Thu, 13 Mar 2014 18:30:19 +0100 Subject: fix topbar channellogo position --- baserender.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/baserender.c b/baserender.c index f894892a..f8825090 100644 --- a/baserender.c +++ b/baserender.c @@ -215,10 +215,11 @@ void cFlatBaseRender::TopBarUpdate(void) { int IconLeft = marginItem; int imageBGWidth = 999; int imageBGHeight = topBarHeight - marginItem*2; + int iconTop = 0; - cImage *imgBG = imgLoader.LoadIcon("logo_background", 999, topBarHeight - marginItem*2); + cImage *imgBG = imgLoader.LoadIcon("logo_background", imageBGWidth, imageBGHeight); if( imgBG ) { - int iconTop = (topBarHeight / 2 - imgBG->Height()/2); + iconTop = (topBarHeight / 2 - imgBG->Height()/2); imageBGHeight = imgBG->Height(); imageBGWidth = imgBG->Width(); topBarIconBGPixmap->DrawImage( cPoint(IconLeft, iconTop), *imgBG ); @@ -226,7 +227,8 @@ void cFlatBaseRender::TopBarUpdate(void) { cImage *img = imgLoader.LoadLogo(*topBarMenuLogo, imageBGWidth, imageBGHeight); if( img ) { - int iconTop = (imageBGHeight - img->Height())/2; + iconTop += (imageBGHeight - img->Height())/2; + dsyslog("imgBGWidth: %d imgBGHeight: %d imgWidth: %d imgHeight: %d iconTop: %d", imageBGWidth, imageBGHeight, img->Width(), img->Height(), iconTop); topBarIconPixmap->DrawImage(cPoint(IconLeft, iconTop), *img); MenuIconWidth = img->Width()+marginItem*2; TitleWidthLeft -= MenuIconWidth + marginItem*3; -- cgit v1.2.3