summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--displaychannelview.c10
-rw-r--r--geometrymanager.c23
-rw-r--r--geometrymanager.h2
-rw-r--r--imagecache.c2
4 files changed, 21 insertions, 16 deletions
diff --git a/displaychannelview.c b/displaychannelview.c
index bb726fb..016dbb9 100644
--- a/displaychannelview.c
+++ b/displaychannelview.c
@@ -77,10 +77,10 @@ void cNopacityDisplayChannelView::CreatePixmaps(void) {
geoManager->channelLogoHeight)
);
pixmapLogoBackground = osd->CreatePixmap(2,
- cRect(geoManager->channelX + geoManager->channelLogoX,
- geoManager->channelLogoY,
- geoManager->channelLogoWidth,
- geoManager->channelLogoHeight)
+ cRect(geoManager->channelX + geoManager->channelLogoBgX,
+ geoManager->channelLogoBgY,
+ geoManager->channelLogoBgWidth,
+ geoManager->channelLogoBgHeight)
);
pixmapChannelName = osd->CreatePixmap(2,
cRect(geoManager->channelX + geoManager->channelContentX,
@@ -228,7 +228,7 @@ void cNopacityDisplayChannelView::DrawChannelLogo(const cChannel *Channel) {
if (config.GetValue("displayType") != dtFlat && config.GetValue("channelUseLogoBackground")) {
cImage *imgLogoBack = imgCache->GetSkinElement(seChannelLogoBack);
if (imgLogoBack)
- pixmapLogoBackground->DrawImage(cPoint(0,0), *imgLogoBack);
+ pixmapLogoBackground->DrawImage(cPoint((geoManager->channelLogoBgWidth - imgLogoBack->Width()) / 2, (geoManager->channelLogoBgHeight - imgLogoBack->Height()) / 2), *imgLogoBack);
}
cImage *imgLogo = imgCache->GetLogo(ctLogo, Channel);
if (imgLogo) {
diff --git a/geometrymanager.c b/geometrymanager.c
index aca3007..bc0384e 100644
--- a/geometrymanager.c
+++ b/geometrymanager.c
@@ -123,17 +123,17 @@ void cGeometryManager::SetGeometry(void) {
channelContentHeight = channelHeight - channelHeaderHeight - channelFooterHeight;
int logoWidthTotalPercent = 16;
- channelLogoWidthTotal = logoWidthTotalPercent * channelWidth /100;
-
- int logoMaxWidth = channelLogoWidthTotal - 10;
- int logoMaxHeight;
- if (config.GetValue("displayType") == dtGraphical) {
- logoMaxHeight = channelHeight - channelHeaderHeight - 2;
- } else {
- logoMaxHeight = channelHeight - 2;
+ channelLogoWidthTotal = logoWidthTotalPercent * channelWidth / 100;
+
+ // 184x130 logo background for 1250x180 graphical display channel window (default theme)
+ channelLogoBgWidth = channelWidth * 184 / 1250;
+ channelLogoBgHeight = channelHeight * 130 / 180;
+ channelLogoBgX = (channelLogoWidthTotal - channelLogoBgWidth) / 2;
+ if (config.GetValue("displayType") != dtGraphical) {
+ channelLogoBgHeight += channelHeaderHeight;
}
- cSize channelLogoSize = ScaleToFit(logoMaxWidth,
- logoMaxHeight,
+ cSize channelLogoSize = ScaleToFit(channelLogoBgWidth,
+ channelLogoBgHeight,
config.GetValue("logoWidthOriginal"),
config.GetValue("logoHeightOriginal"));
channelLogoWidth = channelLogoSize.Width();
@@ -143,12 +143,15 @@ void cGeometryManager::SetGeometry(void) {
switch (config.GetValue("logoVerticalAlignment")) {
case lvTop:
channelLogoY = channelTop + (channelHeight - channelHeaderHeight - channelLogoHeight)/2;
+ channelLogoBgY = channelTop + (channelHeight - channelHeaderHeight - channelLogoBgHeight)/2;
break;
case lvMiddle:
channelLogoY = channelTop + (channelHeight - channelLogoHeight)/2;
+ channelLogoBgY = channelTop + (channelHeight - channelLogoBgHeight)/2;
break;
case lvBottom:
channelLogoY = (channelTop + channelHeaderHeight) + (channelHeight - channelHeaderHeight - channelLogoHeight)/2;
+ channelLogoBgY = (channelTop + channelHeaderHeight) + (channelHeight - channelHeaderHeight - channelLogoBgHeight)/2;
break;
}
diff --git a/geometrymanager.h b/geometrymanager.h
index 4428128..bdf7b49 100644
--- a/geometrymanager.h
+++ b/geometrymanager.h
@@ -68,6 +68,8 @@ class cGeometryManager {
int channelLogoWidthTotal;
int channelLogoX, channelLogoY;
int channelLogoWidth, channelLogoHeight;
+ int channelLogoBgX, channelLogoBgY;
+ int channelLogoBgWidth, channelLogoBgHeight;
int channelChannelNameWidth;
int channelDateWidth;
int channelFooterY;
diff --git a/imagecache.c b/imagecache.c
index b0b08dc..d336c5e 100644
--- a/imagecache.c
+++ b/imagecache.c
@@ -598,7 +598,7 @@ void cImageCache::CreateSkinElementsGraphics(void) {
std::string imgChannelLogoBack = "skinElements/channellogoback";
success = LoadIcon(ctSkinElement, imgChannelLogoBack);
if (success)
- InsertIntoSkinElementCache(seChannelLogoBack, geoManager->channelLogoWidth, geoManager->channelLogoHeight);
+ InsertIntoSkinElementCache(seChannelLogoBack, geoManager->channelLogoBgWidth, geoManager->channelLogoBgHeight);
//DisplayReplay Background and Foreground
std::string imgReplayBackground = "skinElements/displayreplayback";