summaryrefslogtreecommitdiff
path: root/headergrid.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-11 11:28:11 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-11 11:44:39 +0200
commit0766d679806e1ed098f562672e88ef324c3cd680 (patch)
tree727689519e3f2a6b098f7dc1337cb639f44d3321 /headergrid.c
parent3513f82a8c4e01bc375453c9dcb8001b7ea82cd2 (diff)
downloadvdr-plugin-tvguide-0766d679806e1ed098f562672e88ef324c3cd680.tar.gz
vdr-plugin-tvguide-0766d679806e1ed098f562672e88ef324c3cd680.tar.bz2
Change tvguideConfig to Config
Diffstat (limited to 'headergrid.c')
-rw-r--r--headergrid.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/headergrid.c b/headergrid.c
index 1fb4f5a..b077a0d 100644
--- a/headergrid.c
+++ b/headergrid.c
@@ -15,10 +15,10 @@ void cHeaderGrid::createBackground(int num) {
color = theme.Color(clrHeader);
colorBlending = theme.Color(clrHeaderBlending);
int x, y;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
x = geoManager.timeLineWidth + num*geoManager.colWidth;
y = geoManager.statusHeaderHeight + geoManager.channelGroupsHeight;
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
x = geoManager.channelGroupsWidth;
y = geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight;
}
@@ -28,7 +28,7 @@ void cHeaderGrid::createBackground(int num) {
return;
}
pixmapLogo->Fill(clrTransparent);
- if (tvguideConfig.style == eStyleGraphical) {
+ if (config.style == eStyleGraphical) {
drawBackgroundGraphical(bgChannelHeader);
} else {
drawBackground();
@@ -37,9 +37,9 @@ void cHeaderGrid::createBackground(int num) {
}
void cHeaderGrid::drawChannel(const cChannel *channel) {
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
drawChannelVertical(channel);
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
drawChannelHorizontal(channel);
}
}
@@ -48,11 +48,11 @@ void cHeaderGrid::drawChannel(const cChannel *channel) {
void cHeaderGrid::drawChannelHorizontal(const cChannel *channel) {
int logoWidth = geoManager.logoWidth;
- int logoX = tvguideConfig.displayChannelName ? 5 : (Width() - logoWidth) / 2;
+ int logoX = config.displayChannelName ? 5 : (Width() - logoWidth) / 2;
int textX = 5;
int textY = (Height() - fontManager.FontChannelHeaderHorizontal->Height()) / 2;
bool logoFound = false;
- if (!tvguideConfig.hideChannelLogos) {
+ if (!config.hideChannelLogos) {
cImage *logo = imgCache.GetLogo(channel);
if (logo) {
const int logoheight = logo->Height();
@@ -65,13 +65,13 @@ void cHeaderGrid::drawChannelHorizontal(const cChannel *channel) {
if (!logoFound) {
drawText = true;
}
- if (tvguideConfig.displayChannelName) {
+ if (config.displayChannelName) {
drawText = true;
textX += logoWidth + 5;
textWidthMax -= textX;
}
if (drawText) {
- tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
+ tColor colorTextBack = (config.style == eStyleFlat)?color:clrTransparent;
cString strChannel = cString::sprintf("%d %s", channel->Number(), channel->Name());
strChannel = CutText(*strChannel, textWidthMax, fontManager.FontChannelHeaderHorizontal).c_str();
pixmap->DrawText(cPoint(textX, textY), *strChannel, theme.Color(clrFontHeader), colorTextBack, fontManager.FontChannelHeaderHorizontal);
@@ -90,7 +90,7 @@ void cHeaderGrid::drawChannelVertical(const cChannel *channel) {
int lineHeight = fontManager.FontChannelHeader->Height();
int yStart = (geoManager.channelHeaderHeight - lines * lineHeight) / 2 + 8;
bool logoFound = false;
- if (!tvguideConfig.hideChannelLogos) {
+ if (!config.hideChannelLogos) {
cImage *logo = imgCache.GetLogo(channel);
if (logo) {
pixmapLogo->DrawImage(cPoint((Width() - logoWidth) / 2, 6), *logo);
@@ -100,13 +100,13 @@ void cHeaderGrid::drawChannelVertical(const cChannel *channel) {
bool drawText = false;
if (!logoFound) {
drawText = true;
- } else if (tvguideConfig.displayChannelName) {
+ } else if (config.displayChannelName) {
drawText = true;
yStart = logoHeight;
}
if (!drawText)
return;
- tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
+ tColor colorTextBack = (config.style == eStyleFlat)?color:clrTransparent;
for (int i = 0; i < lines; i++) {
int textWidth = fontManager.FontChannelHeader->Width(tw.GetLine(i));
int xText = (geoManager.colWidth - textWidth) / 2;
@@ -118,12 +118,12 @@ void cHeaderGrid::drawChannelVertical(const cChannel *channel) {
void cHeaderGrid::setPosition(int num) {
int x, y, width, height;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
x = geoManager.timeLineWidth + num*geoManager.colWidth;
y = geoManager.statusHeaderHeight + geoManager.channelGroupsHeight;
width = geoManager.colWidth;
height = geoManager.channelHeaderHeight;
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
x = geoManager.channelGroupsWidth;
y = geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight;
width = geoManager.channelHeaderWidth;