summaryrefslogtreecommitdiff
path: root/epggrid.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-05-28 17:23:33 +0200
committerlouis <louis.braun@gmx.de>2013-05-28 17:23:33 +0200
commit4f93ac2516dacdec5e142aaf60a06c6e1c16daf3 (patch)
tree926faf2bc69438f1feb6e43be9f189f15387d9f4 /epggrid.c
parent6a6db7ff523943ec904ee85837b62885da64706e (diff)
downloadvdr-plugin-tvguide-4f93ac2516dacdec5e142aaf60a06c6e1c16daf3.tar.gz
vdr-plugin-tvguide-4f93ac2516dacdec5e142aaf60a06c6e1c16daf3.tar.bz2
avoided nasty font pixelation effects with theme iceblue
Diffstat (limited to 'epggrid.c')
-rw-r--r--epggrid.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/epggrid.c b/epggrid.c
index ac6649e..8dfea95 100644
--- a/epggrid.c
+++ b/epggrid.c
@@ -72,20 +72,21 @@ void cEpgGrid::setText() {
void cEpgGrid::drawText() {
tColor colorText = (active)?theme.Color(clrFontActive):theme.Color(clrFont);
+ tColor colorTextBack = (tvguideConfig.useBlending==0)?color:clrTransparent;
if (tvguideConfig.displayMode == eVertical) {
if (Height()/tvguideConfig.minutePixel < 6)
return;
int textHeight = tvguideConfig.FontGrid->Height();
int textLines = text->Lines();
for (int i=0; i<textLines; i++) {
- pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), colorText, clrTransparent, tvguideConfig.FontGrid);
+ pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), colorText, colorTextBack, tvguideConfig.FontGrid);
}
int extTextLines = extText->Lines();
int offset = (textLines+1)*textHeight - 0.5*textHeight;
textHeight = tvguideConfig.FontGridSmall->Height();
if ((Height()-textHeight-10) > offset) {
for (int i=0; i<extTextLines; i++) {
- pixmap->DrawText(cPoint(borderWidth, borderWidth + offset + i*textHeight), extText->GetLine(i), colorText, clrTransparent, tvguideConfig.FontGridSmall);
+ pixmap->DrawText(cPoint(borderWidth, borderWidth + offset + i*textHeight), extText->GetLine(i), colorText, colorTextBack, tvguideConfig.FontGridSmall);
}
}
if (hasTimer)
@@ -93,13 +94,13 @@ void cEpgGrid::drawText() {
} else if (tvguideConfig.displayMode == eHorizontal) {
if (Width()/tvguideConfig.minutePixel < 10) {
int titleY = (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontal->Height())/2;
- pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, clrTransparent, tvguideConfig.FontGridHorizontal);
+ pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, colorTextBack, tvguideConfig.FontGridHorizontal);
return;
}
- pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, clrTransparent, tvguideConfig.FontGridHorizontalSmall);
+ pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, tvguideConfig.FontGridHorizontalSmall);
cString strTitle = CutText(event->Title(), viewportHeight, tvguideConfig.FontGridHorizontal).c_str();
int titleY = tvguideConfig.FontGridHorizontalSmall->Height() + (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontalSmall->Height() - tvguideConfig.FontGridHorizontal->Height())/2;
- pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, colorText, clrTransparent, tvguideConfig.FontGridHorizontal);
+ pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, colorText, colorTextBack, tvguideConfig.FontGridHorizontal);
}
}
@@ -108,7 +109,7 @@ void cEpgGrid::drawRecIcon() {
int width = tvguideConfig.FontGrid->Width(*recIconText)+2*borderWidth;
int height = tvguideConfig.FontGrid->Height()+10;
pixmap->DrawRectangle( cRect(Width() - width - borderWidth, Height() - height - borderWidth, width, height), theme.Color(clrButtonRed));
- pixmap->DrawText(cPoint(Width() - width, Height() - height - borderWidth/2), *recIconText, theme.Color(clrFont), clrTransparent, tvguideConfig.FontGrid);
+ pixmap->DrawText(cPoint(Width() - width, Height() - height - borderWidth/2), *recIconText, theme.Color(clrFont), theme.Color(clrButtonRed), tvguideConfig.FontGrid);
}
cString cEpgGrid::getTimeString(void) {