setup of usage of blending now done with clrDoBlending theme color variable

This commit is contained in:
louis 2013-05-28 16:57:21 +02:00
parent b3b50abd73
commit a90ee76c4b
13 changed files with 46 additions and 17 deletions

View File

@ -24,3 +24,6 @@ VDR Plugin 'tvguide' Revision History
- Introduced horizontal display
- Added Theme DarkRed
- Fixed some Bugs (position of video, deadlock)
- setup of usage of blending now done with clrDoBlending theme color
variable and not by setup

View File

@ -185,6 +185,16 @@ void cTvguideConfig::SetFonts(void){
}
void cTvguideConfig::SetBlending(void) {
if (theme.Color(clrDoBlending) == CLR_BLENDING_OFF) {
useBlending = 0;
} else if (theme.Color(clrDoBlending) == CLR_BLENDING_DEFAULT)
useBlending = 1;
else {
useBlending = 2;
}
}
void cTvguideConfig::SetLogoPath(cString path) {
logoPath = path;
}
@ -210,7 +220,6 @@ bool cTvguideConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "statusHeaderPercent") == 0) statusHeaderPercent = atoi(Value);
else if (strcmp(Name, "scaleVideo") == 0) scaleVideo = atoi(Value);
else if (strcmp(Name, "decorateVideo") == 0) decorateVideo = atoi(Value);
else if (strcmp(Name, "useBlending") == 0) useBlending = atoi(Value);
else if (strcmp(Name, "roundedCorners") == 0) roundedCorners = atoi(Value);
else if (strcmp(Name, "channelCols") == 0) channelCols = atoi(Value);
else if (strcmp(Name, "channelRows") == 0) channelRows = atoi(Value);

View File

@ -2,13 +2,15 @@
#define __TVGUIDE_CONFIG_H
class cTvguideConfig {
private:
void SetGeometry(int width, int height);
void SetFonts(void);
public:
cTvguideConfig();
~cTvguideConfig();
void SetLogoPath(cString path);
void SetImagesPath(cString path);
void SetGeometry(int width, int height);
void SetFonts(void);
void SetBlending(void);
int osdWidth;
int osdHeight;
int displayMode;

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2013-05-26 17:37+0200\n"
"POT-Creation-Date: 2013-05-28 16:45+0200\n"
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: Horst\n"
"Language-Team: \n"
@ -51,9 +51,6 @@ msgstr "immer"
msgid "Theme"
msgstr "Theme"
msgid "Use color gradients"
msgstr "Farbverläufe verwenden"
msgid "Rounded Corners"
msgstr "Abgerundete Ecken"
@ -191,3 +188,6 @@ msgstr "Timer wurde nicht gesetzt! Es existiert bereits ein Timer für diese Sen
msgid "Timer set"
msgstr "Timer gesetzt"
#~ msgid "Use color gradients"
#~ msgstr "Farbverläufe verwenden"

View File

@ -51,7 +51,6 @@ void cTvguideSetup::Store(void) {
SetupStore("statusHeaderPercent", tvguideConfig.statusHeaderPercent);
SetupStore("scaleVideo", tvguideConfig.scaleVideo);
SetupStore("decorateVideo", tvguideConfig.decorateVideo);
SetupStore("useBlending", tvguideConfig.useBlending);
SetupStore("roundedCorners", tvguideConfig.roundedCorners);
SetupStore("timeFormat", tvguideConfig.timeFormat);
SetupStore("channelCols", tvguideConfig.channelCols);
@ -128,9 +127,6 @@ cMenuSetupGeneral::cMenuSetupGeneral(cTvguideConfig* data) : cMenuSetupSubMenu(
themes.Load(*cString("tvguide"));
timeFormatItems[0] = "12h";
timeFormatItems[1] = "24h";
blendingMethods[0] = "none";
blendingMethods[1] = "classic";
blendingMethods[2] = "nOpacity style";
useSubtitleRerunTexts[0] = tr("never");
useSubtitleRerunTexts[1] = tr("if exists");
useSubtitleRerunTexts[2] = tr("always");
@ -143,7 +139,6 @@ void cMenuSetupGeneral::Set(void) {
Clear();
if (themes.NumThemes())
Add(new cMenuEditStraItem(tr("Theme"), &tmpTvguideConfig->themeIndex, themes.NumThemes(), themes.Descriptions()));
Add(new cMenuEditStraItem(tr("Use color gradients"), &tmpTvguideConfig->useBlending, 3, blendingMethods));
Add(new cMenuEditBoolItem(tr("Rounded Corners"), &tmpTvguideConfig->roundedCorners));
Add(new cMenuEditIntItem(tr("Channels to Jump (Keys Green / Yellow)"), &tmpTvguideConfig->jumpChannels, 2, 30));

View File

@ -28,7 +28,6 @@ class cMenuSetupGeneral : public cMenuSetupSubMenu {
protected:
virtual eOSState ProcessKey(eKeys Key);
cThemes themes;
const char * blendingMethods[3];
const char * timeFormatItems[2];
const char *useSubtitleRerunTexts[3];
void Set(void);

View File

@ -1,5 +1,5 @@
Description = DarkBlue
clrDoBlending = AAAAAAAA
clrBackground = FF000000
clrBackgroundOSD = FF000000
clrGrid1 = FF0E53A7
@ -14,6 +14,8 @@ clrFontButtons = FFFFFFFF
clrHeader = FF8B9194
clrHeaderBlending = FF000000
clrBorder = FFFFFFFF
clrStatusHeader = 00000000
clrStatusHeaderBlending = 00000000
clrTimeline1 = FFFFFFFF
clrTimeline1Blending = FF828282
clrTimeline2 = FF000000

View File

@ -1,4 +1,5 @@
Description = Default
clrDoBlending = AAAAAAAA
clrBackground = FF000000
clrBackgroundOSD = FF000000
clrGrid1 = FF404749
@ -13,6 +14,8 @@ clrFontButtons = FFFFFFFF
clrHeader = FF000000
clrHeaderBlending = FFE0E0E0
clrBorder = FFFFFFFF
clrStatusHeader = 00000000
clrStatusHeaderBlending = 00000000
clrTimeline1 = FFFFFFFF
clrTimeline1Blending = FF828282
clrTimeline2 = FF000000

View File

@ -1,4 +1,5 @@
Description = nOpacity
clrDoBlending = FFFFFFFF
clrBackground = FF000000
clrBackgroundOSD = FF000000
clrGrid1 = EE555555
@ -13,6 +14,8 @@ clrFontButtons = FFFFFFFF
clrHeader = EE888888
clrHeaderBlending = 90000000
clrBorder = DD003DF5
clrStatusHeader = 00000000
clrStatusHeaderBlending = 00000000
clrTimeline1 = BBFFFFFF
clrTimeline1Blending = 90828282
clrTimeline2 = BB000000

View File

@ -1,4 +1,5 @@
Description = nOpacity Dark Red
clrDoBlending = FFFFFFFF
clrBackground = FF000000
clrBackgroundOSD = FF000000
clrGrid1 = EE555555

View File

@ -1,4 +1,5 @@
Description = nOpacity Green
clrDoBlending = FFFFFFFF
clrBackground = FF000000
clrBackgroundOSD = FF000000
clrGrid1 = EE555555
@ -13,6 +14,8 @@ clrFontButtons = FFFFFFFF
clrHeader = EE888888
clrHeaderBlending = 90000000
clrBorder = EE006600
clrStatusHeader = 00000000
clrStatusHeaderBlending = 00000000
clrTimeline1 = BBFFFFFF
clrTimeline1Blending = 90828282
clrTimeline2 = BB000000

View File

@ -1,4 +1,5 @@
Description = nOpacity IceBlue
clrDoBlending = FFFFFFFF
clrBackground = DDFFFFFF
clrBackgroundOSD = DDFFFFFF
clrGrid1 = BB555555
@ -9,7 +10,8 @@ clrFontButtons = FFFFFFFF
clrFontHeader = FF000000
clrHeader = FFFFFFFF
clrBorder = FF000000
clrStatusHeader = DDFFFFFF
clrStatusHeader = 00000000
clrStatusHeaderBlending = 00000000
clrTimeline1 = FFDDDDDD
clrTimeline1Blending = 00000000
clrTimeline2 = FF000000

View File

@ -1,6 +1,12 @@
// --- Theme -------------------------------------------------------------
static cTheme theme;
//BLENDING SETUP
#define CLR_BLENDING_NOPACITY 0xFFFFFFFF
#define CLR_BLENDING_DEFAULT 0xAAAAAAAA
#define CLR_BLENDING_OFF 0x00000000
THEME_CLR(theme, clrDoBlending, CLR_BLENDING_DEFAULT);
THEME_CLR(theme, clrBackgroundOSD, clrBlack);
THEME_CLR(theme, clrBackground, clrBlack);
THEME_CLR(theme, clrGrid1, 0xFF404749);
@ -83,6 +89,7 @@ void cTvGuideOsd::Show(void) {
if (ok) {
tvguideConfig.setDynamicValues(osdManager.Width(), osdManager.Height());
tvguideConfig.loadTheme();
tvguideConfig.SetBlending();
osdManager.setBackground();
myTime = new cMyTime();
myTime->Now();