summaryrefslogtreecommitdiff
path: root/baserender.c
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2013-11-17 19:42:15 +0100
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2013-11-17 19:42:15 +0100
commit969add1f9c9c47ae6c17d1783e34417417281f40 (patch)
treedc0907667ac1bda0835910bc8589eb3182d00fac /baserender.c
parente96728cf26c71f8f76143057bb0594c101370303 (diff)
downloadskin-flatplus-969add1f9c9c47ae6c17d1783e34417417281f40.tar.gz
skin-flatplus-969add1f9c9c47ae6c17d1783e34417417281f40.tar.bz2
add option to show active recording in TopBar
Diffstat (limited to 'baserender.c')
-rw-r--r--baserender.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/baserender.c b/baserender.c
index 72714aa1..ab98ef26 100644
--- a/baserender.c
+++ b/baserender.c
@@ -1,6 +1,9 @@
#include "baserender.h"
#include "flat.h"
+#include "symbols/1080/Crecording.xpm"
+cBitmap cFlatBaseRender::bmCRecording(Crecording_xpm);
+
cFlatBaseRender::cFlatBaseRender(void) {
font = cFont::CreateFont(Setup.FontOsd, Setup.FontOsdSize );
fontSml = cFont::CreateFont(Setup.FontSml, Setup.FontSmlSize);
@@ -16,6 +19,7 @@ cFlatBaseRender::cFlatBaseRender(void) {
topBarLastDate = "";
topBarUpdateTitle = false;
topBarHeight = 0;
+ bmRecording = &bmCRecording;
marginItem = 5;
@@ -173,6 +177,29 @@ void cFlatBaseRender::TopBarUpdate(void) {
topBarPixmap->DrawText(cPoint(TopBarWidth - timeWidth - fullWidth - marginItem*2, fontSmlTop + topBarFontSmlHeight), date, Theme.Color(clrTopBarDateFont), Theme.Color(clrTopBarBg), topBarFontSml, fullWidth, 0, taRight);
DecorBorderDraw(Config.decorBorderTopBarSize, Config.decorBorderTopBarSize, osdWidth - Config.decorBorderTopBarSize*2, topBarHeight, Config.decorBorderTopBarSize, Config.decorBorderTopBarType, Config.decorBorderTopBarFg, Config.decorBorderTopBarBg);
+
+ // look for timers
+ bool isRec = false, isRecPresent = false;
+ for(cTimer *ti = Timers.First(); ti; ti = Timers.Next(ti)) {
+ isRec = true;
+ if( ti->Matches(t) ) {
+ isRecPresent = true;
+ break;
+ }
+ }
+
+ if( isRec && Config.TopBarRecordingShow ) {
+ int left = TopBarWidth - timeWidth - fullWidth - marginItem*3 - bmRecording->Width();
+ int top = (topBarHeight - bmRecording->Height()) / 2;
+ if( isRecPresent ) {
+ topBarPixmap->DrawBitmap(cPoint(left, top), *bmRecording,
+ Theme.Color(clrTopBarRecordingPresent), Theme.Color(clrTopBarBg));
+ } else {
+ topBarPixmap->DrawBitmap(cPoint(left, top), *bmRecording,
+ Theme.Color(clrTopBarDateFont), Theme.Color(clrTopBarBg));
+ }
+ }
+
}
}