summaryrefslogtreecommitdiff
path: root/statusheader.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 /statusheader.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 'statusheader.c')
-rw-r--r--statusheader.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/statusheader.c b/statusheader.c
index 39610d3..1ba3b49 100644
--- a/statusheader.c
+++ b/statusheader.c
@@ -51,6 +51,7 @@ void cStatusHeader::ScaleVideo(void) {
void cStatusHeader::DrawInfoText(cGrid *grid) {
int border = 5;
+ tColor colorTextBack = (tvguideConfig.useBlending==0)?color:clrTransparent;
pixmapText->Fill(clrTransparent);
int x = border;
int y = border;
@@ -61,7 +62,7 @@ void cStatusHeader::DrawInfoText(cGrid *grid) {
title = cString::sprintf(": %s", event->Title());
cString header = cString::sprintf("%s%s", *time, *title);
header = CutText(*header, pixmapText->ViewPort().Width() - 2 * border, tvguideConfig.FontStatusHeaderLarge).c_str();
- pixmapText->DrawText(cPoint(x,y), *header, theme.Color(clrFont), clrTransparent, tvguideConfig.FontStatusHeaderLarge);
+ pixmapText->DrawText(cPoint(x,y), *header, theme.Color(clrFont), colorTextBack, tvguideConfig.FontStatusHeaderLarge);
y += tvguideConfig.FontStatusHeaderLarge->Height() + border;
int heightText = pixmapText->ViewPort().Height() - y;
cTextWrapper description;
@@ -71,17 +72,17 @@ void cStatusHeader::DrawInfoText(cGrid *grid) {
int maxLines = heightText / lineHeight;
int lines = min(textLines, maxLines);
for (int i = 0; i < lines-1; i++) {
- pixmapText->DrawText(cPoint(x,y), description.GetLine(i), theme.Color(clrFont), clrTransparent, tvguideConfig.FontStatusHeader);
+ pixmapText->DrawText(cPoint(x,y), description.GetLine(i), theme.Color(clrFont), colorTextBack, tvguideConfig.FontStatusHeader);
y += lineHeight;
}
cString lastLine = description.GetLine(lines-1);
if (textLines > maxLines) {
lastLine = cString::sprintf("%s...", *lastLine);
}
- pixmapText->DrawText(cPoint(x,y), *lastLine, theme.Color(clrFont), clrTransparent, tvguideConfig.FontStatusHeader);
+ pixmapText->DrawText(cPoint(x,y), *lastLine, theme.Color(clrFont), colorTextBack, tvguideConfig.FontStatusHeader);
} else {
int heightText = pixmapText->ViewPort().Height() - y;
y += (heightText - tvguideConfig.FontStatusHeaderLarge->Height() - 2*border)/2;
- pixmapText->DrawText(cPoint(x,y), *grid->getText(), theme.Color(clrFont), clrTransparent, tvguideConfig.FontStatusHeaderLarge);
+ pixmapText->DrawText(cPoint(x,y), *grid->getText(), theme.Color(clrFont), colorTextBack, tvguideConfig.FontStatusHeaderLarge);
}
}