summaryrefslogtreecommitdiff
path: root/headergrid.c
diff options
context:
space:
mode:
authorkamel5 <kamel5 (at) gmx (dot) net>2018-07-25 19:10:28 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-01-27 11:42:29 +0100
commitc1fe8a8dfda6f25f897afeab4e2bd781a48b27bc (patch)
tree630abda5084b2fe15eab77de924b1d4da31971ad /headergrid.c
parentd0969687ea330facdc3fa0612f3a2216658c6a1a (diff)
downloadvdr-plugin-tvguide-c1fe8a8dfda6f25f897afeab4e2bd781a48b27bc.tar.gz
vdr-plugin-tvguide-c1fe8a8dfda6f25f897afeab4e2bd781a48b27bc.tar.bz2
Center channel logos in EPG grid view
Diffstat (limited to 'headergrid.c')
-rw-r--r--headergrid.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/headergrid.c b/headergrid.c
index ec6a991..8a19ec1 100644
--- a/headergrid.c
+++ b/headergrid.c
@@ -44,6 +44,8 @@ void cHeaderGrid::drawChannel(const cChannel *channel) {
}
}
+// Draw Channel horizontal view
+
void cHeaderGrid::drawChannelHorizontal(const cChannel *channel) {
int logoWidth = geoManager.logoWidth;
int logoX = tvguideConfig.displayChannelName?2:(Width()-logoWidth)/2;
@@ -53,7 +55,8 @@ void cHeaderGrid::drawChannelHorizontal(const cChannel *channel) {
if (!tvguideConfig.hideChannelLogos) {
cImage *logo = imgCache.GetLogo(channel);
if (logo) {
- pixmapLogo->DrawImage(cPoint(logoX, 0), *logo);
+ const int logoheight = logo->Height();
+ pixmapLogo->DrawImage(cPoint(logoX, (Height() - logoheight) / 2), *logo);
logoFound = true;
}
}
@@ -74,6 +77,8 @@ void cHeaderGrid::drawChannelHorizontal(const cChannel *channel) {
}
}
+// Draw Channel vertical view
+
void cHeaderGrid::drawChannelVertical(const cChannel *channel) {
int logoWidth = geoManager.logoWidth;
int logoHeight = geoManager.logoHeight;
@@ -87,7 +92,8 @@ void cHeaderGrid::drawChannelVertical(const cChannel *channel) {
if (!tvguideConfig.hideChannelLogos) {
cImage *logo = imgCache.GetLogo(channel);
if (logo) {
- pixmapLogo->DrawImage(cPoint((Width() - logoWidth)/2, 4), *logo);
+ const int logoheight = logo->Height();
+ pixmapLogo->DrawImage(cPoint((Width() - logoWidth) / 2, (geoManager.channelHeaderHeight - lineHeight - logoheight) / 2), *logo);
logoFound = true;
}
}