From 4f93ac2516dacdec5e142aaf60a06c6e1c16daf3 Mon Sep 17 00:00:00 2001 From: louis Date: Tue, 28 May 2013 17:23:33 +0200 Subject: avoided nasty font pixelation effects with theme iceblue --- epggrid.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'epggrid.c') 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; iDrawText(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; iDrawText(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) { -- cgit v1.2.3