summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--displaychannel.c19
-rw-r--r--nopacity.c7
3 files changed, 26 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index 93f338b..86d7197 100644
--- a/HISTORY
+++ b/HISTORY
@@ -245,3 +245,5 @@ Version 0.1.4
(closes Feature 1402)
- Changed display of trick speed in displayReplay (closes Feature 1433)
- Improved display of channel separators (closes tickets 1477 and 1482)
+- Added REC Icon in displayChannel for current and next event (closes
+ Feature 1403)
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);
diff --git a/nopacity.c b/nopacity.c
index d9e9595..47f0621 100644
--- a/nopacity.c
+++ b/nopacity.c
@@ -11,6 +11,7 @@ static bool firstDisplay = true;
//COMMON
#define CLR_TRANSBLACK 0xDD000000
#define CLR_TRANSBLACK2 0xB0000000
+#define CLR_BLACK 0xFF000000
#define CLR_DARKBLUE 0xDD003DF5
#define CLR_DARKBLUE2 0xB0003DF5
#define CLR_WHITE 0xFFFFFFFF
@@ -22,6 +23,7 @@ static bool firstDisplay = true;
#define CLR_PROGRESSBARBLEND 0xDD80B3FF
#define CLR_CHANNELSYMBOLOFF 0xDD858585
#define CLR_CHANNELRECACTIVE 0xDDFF0000
+#define CLR_RECNEXT 0xDDFFFF00
//REPLAY
#define CLR_REPLAYCURRENTTOTAL 0xFF003DF5
@@ -37,7 +39,7 @@ static bool firstDisplay = true;
#define CLR_MENUITEMHIGHBLEND 0xEE0033FF
#define CLR_SEPARATORBORDER 0xEE444444
#define CLR_DISKALERT 0xDDFF0000
-#define CLR_MENUHEADER 0xDD000000
+#define CLR_MENUHEADER 0xDD000000
#define CLR_MENUHEADERBLEND 0xEE0033FF
//BUTTONS
@@ -71,6 +73,9 @@ THEME_CLR(Theme, clrProgressBarBlend, CLR_PROGRESSBARBLEND);
THEME_CLR(Theme, clrChannelSymbolOn, CLR_DARKBLUE);
THEME_CLR(Theme, clrChannelSymbolOff, CLR_CHANNELSYMBOLOFF);
THEME_CLR(Theme, clrChannelRecActive, CLR_CHANNELRECACTIVE);
+THEME_CLR(Theme, clrRecNowFont, CLR_WHITE);
+THEME_CLR(Theme, clrRecNext, CLR_RECNEXT);
+THEME_CLR(Theme, clrRecNextFont, CLR_BLACK);
//REPLAY
THEME_CLR(Theme, clrReplayBackground, CLR_TRANSBLACK2);
THEME_CLR(Theme, clrReplayBackBlend, CLR_DARKBLUE2);