summaryrefslogtreecommitdiff
path: root/displaychannel.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-09-12 17:59:45 +0200
committerlouis <louis.braun@gmx.de>2013-09-12 17:59:45 +0200
commita4ab679ff24e869bf0f50826b9a0514fac0cba8b (patch)
tree05cc1bb7c18e978125941d0c50c6fb41f455a172 /displaychannel.c
parent83fe0cb122cac8e5ecb69264e4688837f233afcc (diff)
downloadskin-nopacity-a4ab679ff24e869bf0f50826b9a0514fac0cba8b.tar.gz
skin-nopacity-a4ab679ff24e869bf0f50826b9a0514fac0cba8b.tar.bz2
Added REC Icon in displayChannel for current and next event (closes Feature 1403)
Diffstat (limited to 'displaychannel.c')
-rw-r--r--displaychannel.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/displaychannel.c b/displaychannel.c
index 84dd2fb..5a54395 100644
--- a/displaychannel.c
+++ b/displaychannel.c
@@ -695,6 +695,13 @@ void cNopacityDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Fol
}
int seenWidth = fontEPG->Width(*strSeen);
int space = infoWidth - 9*indent - seenWidth - startTimeWidth - config.resolutionIconSize;
+ bool drawRecIcon = false;
+ int widthRecIcon = 0;
+ if (e->HasTimer()) {
+ drawRecIcon = true;
+ widthRecIcon = fontEPGSmall->Width(" REC ");
+ space -= widthRecIcon + indent/2;
+ }
cString strEPG = e->Title();
if (space < epgWidth) {
strEPG = CutText(e->Title(), space, fontEPG).c_str();
@@ -706,7 +713,17 @@ void cNopacityDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Fol
}
tColor fontColor = (i==0)?Theme.Color(clrChannelEPG):Theme.Color(clrChannelEPGInfo);
pixmapEPGInfo->DrawText(cPoint(indent, y * epgInfoLineHeight), *startTime, fontColor, clrTransparent, fontEPG);
- pixmapEPGInfo->DrawText(cPoint(2 * indent + startTimeWidth, y * epgInfoLineHeight), *strEPG, fontColor, clrTransparent, fontEPG);
+ int xEPGInfo = 2 * indent + startTimeWidth;
+ if (drawRecIcon) {
+ tColor clrRecIcon = (i==0)?Theme.Color(clrChannelRecActive):Theme.Color(clrRecNext);
+ tColor clrRecIconText = (i==0)?Theme.Color(clrRecNowFont):Theme.Color(clrRecNextFont);
+ pixmapEPGInfo->DrawRectangle(cRect(xEPGInfo, y * epgInfoLineHeight , widthRecIcon, epgInfoLineHeight), clrRecIcon);
+ int xRecText = xEPGInfo + (widthRecIcon - fontEPGSmall->Width("REC"))/2;
+ int yRecText = y * epgInfoLineHeight + (epgInfoLineHeight - fontEPGSmall->Height())/2;
+ pixmapEPGInfo->DrawText(cPoint(xRecText, yRecText), "REC", clrRecIconText, clrRecIcon, fontEPGSmall);
+ xEPGInfo += widthRecIcon + indent/2;
+ }
+ pixmapEPGInfo->DrawText(cPoint(xEPGInfo, y * epgInfoLineHeight), *strEPG, fontColor, clrTransparent, fontEPG);
pixmapEPGInfo->DrawText(cPoint(2 * indent + startTimeWidth, (y+1) * epgInfoLineHeight + 3), *strEPGShort, fontColor, clrTransparent, fontEPGSmall);
int x = infoWidth - indent - seenWidth - config.resolutionIconSize - indent;
pixmapEPGInfo->DrawText(cPoint(x, y * epgInfoLineHeight), *strSeen, fontColor, clrTransparent, fontEPG);