summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflat@schirrmacher.eu>2013-08-03 19:33:51 +0200
committerMartin Schirrmacher <vdr.skinflat@schirrmacher.eu>2013-08-03 19:33:51 +0200
commit33b71d21d4ea31a5ba79934e3341b06e8307462e (patch)
treed8d94434b1182f44962f6d76580084d6c980d379
parent3d22892d17188a55ba9b144860d6525e42f4d618 (diff)
downloadskin-flat-33b71d21d4ea31a5ba79934e3341b06e8307462e.tar.gz
skin-flat-33b71d21d4ea31a5ba79934e3341b06e8307462e.tar.bz2
color changes
-rw-r--r--HISTORY8
-rw-r--r--baserender.c43
-rw-r--r--displaychannel.c22
-rw-r--r--displaymenu.c2
-rw-r--r--flat.h26
-rwxr-xr-xgenerate_theme.sh4
-rw-r--r--themes/flat-default.theme26
-rw-r--r--themes/flat-white.theme26
8 files changed, 96 insertions, 61 deletions
diff --git a/HISTORY b/HISTORY
index 303a9b2..6cfea5f 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,7 +1,13 @@
VDR Plugin 'skinflat' Revision History
---------------------------------------
2013-XX-XX: Version 0.0.3
-- [fix] replay jump display
+- [update] top bar, 2 rows date, color
+- [update] color values
+- [update] channel display, separate color for following epg
+- [update] display message in middle of screen
+- [fix] replay display, marks, position and more
+- [fix] many small fixes
+- [fix] dipslay menu recording info, textcolor
2013-30-07: Version 0.0.2
- [add] replay marks
diff --git a/baserender.c b/baserender.c
index c307195..fea4749 100644
--- a/baserender.c
+++ b/baserender.c
@@ -69,7 +69,10 @@ void cFlatBaseRender::CreateOsd(int left, int top, int width, int height) {
}
void cFlatBaseRender::TopBarCreate(void) {
- topBarHeight = fontHeight;
+ if( fontHeight > fontSmlHeight*2 )
+ topBarHeight = fontHeight;
+ else
+ topBarHeight = fontSmlHeight * 2;
topBarPixmap = osd->CreatePixmap(1, cRect(0, 0, osdWidth, topBarHeight));
topBarPixmap->Fill(clrTransparent);
@@ -87,10 +90,27 @@ void cFlatBaseRender::TopBarUpdate(void) {
topBarUpdateTitle = false;
topBarLastDate = curDate;
+ int fontTop = (topBarHeight - fontHeight) / 2;
topBarPixmap->Fill(Theme.Color(clrTopBarBg));
- topBarPixmap->DrawText(cPoint(marginItem, 0), topBarTitle, Theme.Color(clrTopBarFont), clrTransparent, font);
- int width = font->Width(*curDate);
- topBarPixmap->DrawText(cPoint(osdWidth - width, 0), curDate, Theme.Color(clrTopBarDateTimeFont), clrTransparent, font);
+ topBarPixmap->DrawText(cPoint(marginItem*2, fontTop), topBarTitle, Theme.Color(clrTopBarFont), Theme.Color(clrTopBarBg), font);
+
+ time_t t;
+ time(&t);
+
+ cString time = TimeString(t);
+ int timeWidth = font->Width(*time) + marginItem*2;
+ topBarPixmap->DrawText(cPoint(osdWidth - timeWidth, fontTop), time, Theme.Color(clrTopBarTimeFont), Theme.Color(clrTopBarBg), font);
+
+ cString weekday = WeekDayNameFull(t);
+ int weekdayWidth = fontSml->Width(*weekday);
+
+ cString date = ShortDateString(t);
+ int dateWidth = fontSml->Width(*date);
+
+ int fullWidth = max(weekdayWidth, dateWidth);
+
+ topBarPixmap->DrawText(cPoint(osdWidth - timeWidth - fullWidth - marginItem*2, 0), weekday, Theme.Color(clrTopBarDateFont), Theme.Color(clrTopBarBg), fontSml, 0, taCenter);
+ topBarPixmap->DrawText(cPoint(osdWidth - timeWidth - fullWidth - marginItem*2, fontSmlHeight), date, Theme.Color(clrTopBarDateFont), Theme.Color(clrTopBarBg), fontSml, 0, taCenter);
}
}
@@ -109,24 +129,25 @@ void cFlatBaseRender::ButtonsSet(const char *Red, const char *Green, const char
int x = 0;
buttonsPixmap->DrawText(cPoint(x, 0), Red, Theme.Color(clrButtonFont), Theme.Color(clrButtonBg), font, buttonWidth, 0, taCenter);
- buttonsPixmap->DrawRectangle(cRect(x, fontHeight + 12, buttonWidth, 4), Theme.Color(clrButtonRed));
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + 10, buttonWidth, 6), Theme.Color(clrButtonRed));
x += buttonWidth + marginItem;
buttonsPixmap->DrawText(cPoint(x, 0), Green, Theme.Color(clrButtonFont), Theme.Color(clrButtonBg), font, buttonWidth, 0, taCenter);
- buttonsPixmap->DrawRectangle(cRect(x, fontHeight + 12, buttonWidth, 4), Theme.Color(clrButtonGreen));
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + 10, buttonWidth, 6), Theme.Color(clrButtonGreen));
x += buttonWidth + marginItem;
buttonsPixmap->DrawText(cPoint(x, 0), Yellow, Theme.Color(clrButtonFont), Theme.Color(clrButtonBg), font, buttonWidth, 0, taCenter);
- buttonsPixmap->DrawRectangle(cRect(x, fontHeight + 12, buttonWidth, 4), Theme.Color(clrButtonYellow));
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + 10, buttonWidth, 6), Theme.Color(clrButtonYellow));
x += buttonWidth + marginItem;
buttonsPixmap->DrawText(cPoint(x, 0), Blue, Theme.Color(clrButtonFont), Theme.Color(clrButtonBg), font, buttonWidth, 0, taCenter);
- buttonsPixmap->DrawRectangle(cRect(x, fontHeight + 12, buttonWidth, 4), Theme.Color(clrButtonBlue));
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + 10, buttonWidth, 6), Theme.Color(clrButtonBlue));
}
void cFlatBaseRender::MessageCreate(void) {
messageHeight = fontHeight;
- messagePixmap = osd->CreatePixmap(2, cRect(0, osdHeight - messageHeight - 150, osdWidth, messageHeight));
+ int top = (osdHeight - messageHeight) / 2;
+ messagePixmap = osd->CreatePixmap(2, cRect(0, top, osdWidth, messageHeight));
messagePixmap->Fill(clrTransparent);
}
@@ -148,8 +169,8 @@ void cFlatBaseRender::MessageSet(eMessageType Type, const char *Text) {
}
messagePixmap->Fill(Theme.Color(clrMessageBg));
- messagePixmap->DrawRectangle(cRect( 0, 0, 50, messageHeight), col);
- messagePixmap->DrawRectangle(cRect( osdWidth - 50, 0, 50, messageHeight), col);
+ messagePixmap->DrawRectangle(cRect( 0, 0, messageHeight, messageHeight), col);
+ messagePixmap->DrawRectangle(cRect( osdWidth - messageHeight, 0, messageHeight, messageHeight), col);
int textWidth = font->Width(Text);
messagePixmap->DrawText(cPoint((osdWidth - textWidth) / 2, 0), Text, Theme.Color(clrMessageFont), Theme.Color(clrMessageBg), font);
diff --git a/displaychannel.c b/displaychannel.c
index 561510b..29bcc3c 100644
--- a/displaychannel.c
+++ b/displaychannel.c
@@ -11,8 +11,8 @@ cFlatDisplayChannel::cFlatDisplayChannel(bool WithInfo) {
MessageCreate();
// von unten noch oben
- // 2 * EPG + 2 * EPGsml
- heightBottom = (fontHeight * 2) + (fontSmlHeight * 2) + ProgressBarHeight(); // Top, Buttom, Between
+ // 2*EPG + 2*EPGsml
+ heightBottom = (fontHeight*2) + (fontSmlHeight*2) + marginItem; // Top, Buttom, Between
int heightTop = fontHeight;
int height = heightBottom;
@@ -83,7 +83,7 @@ void cFlatDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Followi
int s = (int)(time(NULL) - Present->StartTime()) / 60;
int sleft = (Present->Duration() / 60) - s;
- cString seen = cString::sprintf("%d-/%d+ (%d) min", s, sleft, Present->Duration() / 60);
+ cString seen = cString::sprintf("%d-/%d+ %d min", s, sleft, Present->Duration() / 60);
int seenWidth = fontSml->Width(*seen);
if( epgWidth > osdWidth - left - timeStringWidth ) {
@@ -104,9 +104,9 @@ void cFlatDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Followi
epgShort = Present->ShortText();
}
- chanInfoBottomPixmap->DrawText(cPoint(osdWidth - timeStringWidth, 0), *timeString,
+ chanInfoBottomPixmap->DrawText(cPoint(osdWidth - timeStringWidth - marginItem * 2, 0), *timeString,
Theme.Color(clrChannelFontEpg), Theme.Color(clrChannelBg), fontSml);
- chanInfoBottomPixmap->DrawText(cPoint(osdWidth - seenWidth, fontSmlHeight), *seen,
+ chanInfoBottomPixmap->DrawText(cPoint(osdWidth - seenWidth - marginItem * 2, fontSmlHeight), *seen,
Theme.Color(clrChannelFontEpg), Theme.Color(clrChannelBg), fontSml);
chanInfoBottomPixmap->DrawText(cPoint(left, 0), *epg, Theme.Color(clrChannelFontEpg), Theme.Color(clrChannelBg), font);
@@ -143,15 +143,15 @@ void cFlatDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Followi
epgShort = Following->ShortText();
}
- chanInfoBottomPixmap->DrawText(cPoint(osdWidth - timeStringWidth, fontHeight + fontSmlHeight), *timeString,
- Theme.Color(clrChannelFontEpg), Theme.Color(clrChannelBg), fontSml);
- chanInfoBottomPixmap->DrawText(cPoint(osdWidth - durWidth, fontHeight + fontSmlHeight*2), *dur,
- Theme.Color(clrChannelFontEpg), Theme.Color(clrChannelBg), fontSml);
+ chanInfoBottomPixmap->DrawText(cPoint(osdWidth - timeStringWidth - marginItem * 2, fontHeight + fontSmlHeight), *timeString,
+ Theme.Color(clrChannelFontEpgFollow), Theme.Color(clrChannelBg), fontSml);
+ chanInfoBottomPixmap->DrawText(cPoint(osdWidth - durWidth - marginItem * 2, fontHeight + fontSmlHeight*2), *dur,
+ Theme.Color(clrChannelFontEpgFollow), Theme.Color(clrChannelBg), fontSml);
chanInfoBottomPixmap->DrawText(cPoint(left, fontHeight + fontSmlHeight), *epg,
- Theme.Color(clrChannelFontEpg), Theme.Color(clrChannelBg), font);
+ Theme.Color(clrChannelFontEpgFollow), Theme.Color(clrChannelBg), font);
chanInfoBottomPixmap->DrawText(cPoint(left, fontHeight*2 + fontSmlHeight), *epgShort,
- Theme.Color(clrChannelFontEpg), Theme.Color(clrChannelBg), fontSml);
+ Theme.Color(clrChannelFontEpgFollow), Theme.Color(clrChannelBg), fontSml);
}
}
diff --git a/displaymenu.c b/displaymenu.c
index 4cc6f66..b8080ac 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -157,7 +157,7 @@ void cFlatDisplayMenu::SetRecording(const cRecording *Recording) {
menuPixmap->DrawText(cPoint(0, 0), timeString, Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg), fontSml, menuWidth);
menuPixmap->DrawText(cPoint(0, fontSmlHeight), title, Theme.Color(clrMenuRecFontTitle), Theme.Color(clrMenuRecBg), font, menuWidth);
- menuPixmap->DrawText(cPoint(0, fontSmlHeight + fontHeight), shortText, Theme.Color(clrMenuRecFontTitle), Theme.Color(clrMenuRecBg), fontSml, menuWidth);
+ menuPixmap->DrawText(cPoint(0, fontSmlHeight + fontHeight), shortText, Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg), fontSml, menuWidth);
ContentSet( recInfo->Description(), Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg) );
if( ContentScrollable() )
diff --git a/flat.h b/flat.h
index 2ee68b9..0f17307 100644
--- a/flat.h
+++ b/flat.h
@@ -7,21 +7,22 @@ class cFlatDisplayMenu;
extern cTheme Theme;
// BUTTONS
-#define CLR_BUTTONRED 0x99BB0000
-#define CLR_BUTTONGREEN 0x9900BB00
-#define CLR_BUTTONYELLOW 0x99BBBB00
-#define CLR_BUTTONBLUE 0x990000BB
+#define CLR_BUTTONRED 0xFFBB0000
+#define CLR_BUTTONGREEN 0xFF00BB00
+#define CLR_BUTTONYELLOW 0xFFBBBB00
+#define CLR_BUTTONBLUE 0xFF0000BB
// MESSAGES
-#define CLR_MESSAGESTATUS 0xBB0000FF
-#define CLR_MESSAGEINFO 0xBB009900
-#define CLR_MESSAGEWARNING 0xBBBBBB00
-#define CLR_MESSAGEERROR 0xBBBB0000
+#define CLR_MESSAGESTATUS 0xFF0000FF
+#define CLR_MESSAGEINFO 0xFF009900
+#define CLR_MESSAGEWARNING 0xFFBBBB00
+#define CLR_MESSAGEERROR 0xFFBB0000
// TopBar
THEME_CLR(Theme, clrTopBarBg, 0xBB101010);
THEME_CLR(Theme, clrTopBarFont, 0xFFEEEEEE);
-THEME_CLR(Theme, clrTopBarDateTimeFont, 0xFFEEEEEE);
+THEME_CLR(Theme, clrTopBarTimeFont, 0xFFEEEEEE);
+THEME_CLR(Theme, clrTopBarDateFont, 0xFFA0A0A0);
// Buttons
THEME_CLR(Theme, clrButtonBg, 0xBB101010);
@@ -42,8 +43,9 @@ THEME_CLR(Theme, clrMessageError, CLR_MESSAGEERROR);
// Channel
THEME_CLR(Theme, clrChannelBg, 0xBB101010);
-THEME_CLR(Theme, clrChannelFontTitle, 0xFFEEEEEE);
+THEME_CLR(Theme, clrChannelFontTitle, 0xFF3090B0);
THEME_CLR(Theme, clrChannelFontEpg, 0xFFEEEEEE);
+THEME_CLR(Theme, clrChannelFontEpgFollow, 0xFFA0A0A0);
THEME_CLR(Theme, clrChannelProgressFg, 0xFFEEEEEE);
THEME_CLR(Theme, clrChannelProgressBarFg, 0xFFEEEEEE);
THEME_CLR(Theme, clrChannelProgressBg, 0xBB101010);
@@ -60,11 +62,11 @@ THEME_CLR(Theme, clrScrollbarBarFg, 0xFFEEEEEE);
THEME_CLR(Theme, clrScrollbarBg, 0xBB101010);
// Menu Event
THEME_CLR(Theme, clrMenuEventBg, 0xBB101010);
-THEME_CLR(Theme, clrMenuEventFontTitle, 0xFFEEEEEE);
+THEME_CLR(Theme, clrMenuEventFontTitle, 0xFF3090B0);
THEME_CLR(Theme, clrMenuEventFontInfo, 0xFFEEEEEE);
// Menu Recording
THEME_CLR(Theme, clrMenuRecBg, 0xBB101010);
-THEME_CLR(Theme, clrMenuRecFontTitle, 0xFFEEEEEE);
+THEME_CLR(Theme, clrMenuRecFontTitle, 0xFF3090B0);
THEME_CLR(Theme, clrMenuRecFontInfo, 0xFFEEEEEE);
// Menu Text (Multiline)
THEME_CLR(Theme, clrMenuTextBg, 0xBB101010);
diff --git a/generate_theme.sh b/generate_theme.sh
index 135afa0..00a9a5a 100755
--- a/generate_theme.sh
+++ b/generate_theme.sh
@@ -84,7 +84,8 @@ FILE=flat-${ThemeName}.theme
echo "Description = $ThemeName" > $FILE
echo "clrTopBarBg = $Background" >> $FILE
echo "clrTopBarFont = $Font" >> $FILE
-echo "clrTopBarDateTimeFont = $Font" >> $FILE
+echo "clrTopBarTimeFont = $Font" >> $FILE
+echo "clrTopBarDateFont = $Font" >> $FILE
echo "clrButtonBg = $Background" >> $FILE
echo "clrButtonFont = $Font" >> $FILE
echo "clrButtonRed = 99BB0000" >> $FILE
@@ -100,6 +101,7 @@ echo "clrMessageError = 90BB0000" >> $FILE
echo "clrChannelBg = $Background" >> $FILE
echo "clrChannelFontTitle = $TitleFont" >> $FILE
echo "clrChannelFontEpg = $Font" >> $FILE
+echo "clrChannelFontEpgFollow = $Font" >> $FILE
echo "clrChannelProgressFg = $ProgressFG" >> $FILE
echo "clrChannelProgressBarFg = $ProgressBarFG" >> $FILE
echo "clrChannelProgressBg = $Background" >> $FILE
diff --git a/themes/flat-default.theme b/themes/flat-default.theme
index 0fd5197..31b1869 100644
--- a/themes/flat-default.theme
+++ b/themes/flat-default.theme
@@ -1,22 +1,24 @@
Description = Default
clrTopBarBg = BB101010
clrTopBarFont = FFEEEEEE
-clrTopBarDateTimeFont = FFEEEEEE
+clrTopBarTimeFont = FFEEEEEE
+clrTopBarDateFont = FFA0A0A0
clrButtonBg = BB101010
clrButtonFont = FFEEEEEE
-clrButtonRed = 99BB0000
-clrButtonGreen = 9900BB00
-clrButtonYellow = 99BBBB00
-clrButtonBlue = 990000BB
+clrButtonRed = FFBB0000
+clrButtonGreen = FF00BB00
+clrButtonYellow = FFBBBB00
+clrButtonBlue = FF0000BB
clrMessageBg = BB101010
clrMessageFont = FFEEEEEE
-clrMessageStatus = BB0000FF
-clrMessageInfo = BB009900
-clrMessageWarning = BBBBBB00
-clrMessageError = BBBB0000
+clrMessageStatus = FF0000FF
+clrMessageInfo = FF009900
+clrMessageWarning = FFBBBB00
+clrMessageError = FFBB0000
clrChannelBg = BB101010
-clrChannelFontTitle = FFEEEEEE
+clrChannelFontTitle = FF3090B0
clrChannelFontEpg = FFEEEEEE
+clrChannelFontEpgFollow = FFA0A0A0
clrChannelProgressFg = FFEEEEEE
clrChannelProgressBarFg = FFEEEEEE
clrChannelProgressBg = BB101010
@@ -30,10 +32,10 @@ clrScrollbarFg = FFEEEEEE
clrScrollbarBarFg = FFEEEEEE
clrScrollbarBg = BB101010
clrMenuEventBg = BB101010
-clrMenuEventFontTitle = FFEEEEEE
+clrMenuEventFontTitle = FF3090B0
clrMenuEventFontInfo = FFEEEEEE
clrMenuRecBg = BB101010
-clrMenuRecFontTitle = FFEEEEEE
+clrMenuRecFontTitle = FF3090B0
clrMenuRecFontInfo = FFEEEEEE
clrMenuTextBg = BB101010
clrMenuTextFont = FFEEEEEE
diff --git a/themes/flat-white.theme b/themes/flat-white.theme
index 6092cd2..1899b89 100644
--- a/themes/flat-white.theme
+++ b/themes/flat-white.theme
@@ -1,22 +1,24 @@
Description = white
clrTopBarBg = 90CCCCCC
clrTopBarFont = FF222222
-clrTopBarDateTimeFont = FF222222
+clrTopBarTimeFont = FF222222
+clrTopBarDateFont = FF505050
clrButtonBg = 90CCCCCC
clrButtonFont = FF222222
-clrButtonRed = 99BB0000
-clrButtonGreen = 9900BB00
-clrButtonYellow = 99BBBB00
-clrButtonBlue = 990000BB
+clrButtonRed = FFBB0000
+clrButtonGreen = FF00BB00
+clrButtonYellow = FFBBBB00
+clrButtonBlue = FF0000BB
clrMessageBg = 90CCCCCC
clrMessageFont = FF222222
-clrMessageStatus = 900000FF
-clrMessageInfo = 90009900
-clrMessageWarning = 90BBBB00
-clrMessageError = 90BB0000
+clrMessageStatus = FF0000FF
+clrMessageInfo = FF009900
+clrMessageWarning = FFBBBB00
+clrMessageError = FFBB0000
clrChannelBg = 90CCCCCC
-clrChannelFontTitle = FF222222
+clrChannelFontTitle = FF206277
clrChannelFontEpg = FF222222
+clrChannelFontEpgFollow = FF505050
clrChannelProgressFg = FF222222
clrChannelProgressBarFg = FF222222
clrChannelProgressBg = 90CCCCCC
@@ -30,10 +32,10 @@ clrScrollbarFg = FF222222
clrScrollbarBg = 90CCCCCC
clrScrollbarBarFg = FF222222
clrMenuEventBg = 90CCCCCC
-clrMenuEventFontTitle = FF222222
+clrMenuEventFontTitle = FF206277
clrMenuEventFontInfo = FF222222
clrMenuRecBg = 90CCCCCC
-clrMenuRecFontTitle = FF222222
+clrMenuRecFontTitle = FF206277
clrMenuRecFontInfo = FF222222
clrMenuTextBg = 90CCCCCC
clrMenuTextFont = FF222222