From a90ee76c4b36a9d11fa63e6a454a362cff7dcb31 Mon Sep 17 00:00:00 2001 From: louis Date: Tue, 28 May 2013 16:57:21 +0200 Subject: [PATCH] setup of usage of blending now done with clrDoBlending theme color variable --- HISTORY | 3 +++ config.c | 11 ++++++++++- config.h | 6 ++++-- po/de_DE.po | 8 ++++---- setup.c | 5 ----- setup.h | 1 - themes/tvguide-darkblue.theme | 4 +++- themes/tvguide-default.theme | 3 +++ themes/tvguide-nOpacity.theme | 5 ++++- themes/tvguide-nOpacitydarkred.theme | 1 + themes/tvguide-nOpacitygreen.theme | 5 ++++- themes/tvguide-nOpacityiceblue.theme | 4 +++- tvguideosd.c | 7 +++++++ 13 files changed, 46 insertions(+), 17 deletions(-) diff --git a/HISTORY b/HISTORY index 9ebfa44..9b8fbaa 100644 --- a/HISTORY +++ b/HISTORY @@ -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 diff --git a/config.c b/config.c index b44c2c0..fb2ea0e 100644 --- a/config.c +++ b/config.c @@ -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); diff --git a/config.h b/config.h index beaa696..4df9177 100644 --- a/config.h +++ b/config.h @@ -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; diff --git a/po/de_DE.po b/po/de_DE.po index 6e848ef..979ec86 100755 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-tvguide 0.0.1\n" "Report-Msgid-Bugs-To: \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" diff --git a/setup.c b/setup.c index ebb94dd..aac537e 100644 --- a/setup.c +++ b/setup.c @@ -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)); diff --git a/setup.h b/setup.h index 5b3e2ea..215dfce 100644 --- a/setup.h +++ b/setup.h @@ -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); diff --git a/themes/tvguide-darkblue.theme b/themes/tvguide-darkblue.theme index 59db3ad..59b3c1b 100644 --- a/themes/tvguide-darkblue.theme +++ b/themes/tvguide-darkblue.theme @@ -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 diff --git a/themes/tvguide-default.theme b/themes/tvguide-default.theme index b9817b5..300d97d 100644 --- a/themes/tvguide-default.theme +++ b/themes/tvguide-default.theme @@ -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 diff --git a/themes/tvguide-nOpacity.theme b/themes/tvguide-nOpacity.theme index f00d54b..f79e2f8 100644 --- a/themes/tvguide-nOpacity.theme +++ b/themes/tvguide-nOpacity.theme @@ -1,4 +1,5 @@ Description = nOpacity +clrDoBlending = FFFFFFFF clrBackground = FF000000 clrBackgroundOSD = FF000000 clrGrid1 = EE555555 @@ -12,7 +13,9 @@ clrFontHeader = FFFFFFFF clrFontButtons = FFFFFFFF clrHeader = EE888888 clrHeaderBlending = 90000000 -clrBorder = DD003DF5 +clrBorder = DD003DF5 +clrStatusHeader = 00000000 +clrStatusHeaderBlending = 00000000 clrTimeline1 = BBFFFFFF clrTimeline1Blending = 90828282 clrTimeline2 = BB000000 diff --git a/themes/tvguide-nOpacitydarkred.theme b/themes/tvguide-nOpacitydarkred.theme index 0b6cb85..afc686e 100644 --- a/themes/tvguide-nOpacitydarkred.theme +++ b/themes/tvguide-nOpacitydarkred.theme @@ -1,4 +1,5 @@ Description = nOpacity Dark Red +clrDoBlending = FFFFFFFF clrBackground = FF000000 clrBackgroundOSD = FF000000 clrGrid1 = EE555555 diff --git a/themes/tvguide-nOpacitygreen.theme b/themes/tvguide-nOpacitygreen.theme index 46ca336..8c647b0 100644 --- a/themes/tvguide-nOpacitygreen.theme +++ b/themes/tvguide-nOpacitygreen.theme @@ -1,4 +1,5 @@ Description = nOpacity Green +clrDoBlending = FFFFFFFF clrBackground = FF000000 clrBackgroundOSD = FF000000 clrGrid1 = EE555555 @@ -12,7 +13,9 @@ clrFontHeader = FFFFFFFF clrFontButtons = FFFFFFFF clrHeader = EE888888 clrHeaderBlending = 90000000 -clrBorder = EE006600 +clrBorder = EE006600 +clrStatusHeader = 00000000 +clrStatusHeaderBlending = 00000000 clrTimeline1 = BBFFFFFF clrTimeline1Blending = 90828282 clrTimeline2 = BB000000 diff --git a/themes/tvguide-nOpacityiceblue.theme b/themes/tvguide-nOpacityiceblue.theme index c14083a..da0d42f 100644 --- a/themes/tvguide-nOpacityiceblue.theme +++ b/themes/tvguide-nOpacityiceblue.theme @@ -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 diff --git a/tvguideosd.c b/tvguideosd.c index 17e4637..ccfad87 100644 --- a/tvguideosd.c +++ b/tvguideosd.c @@ -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();