diff options
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | README | 7 | ||||
-rw-r--r-- | config.c | 3 | ||||
-rw-r--r-- | config.h | 2 | ||||
-rw-r--r-- | enigma.c | 12 | ||||
-rw-r--r-- | setup.c | 11 | ||||
-rw-r--r-- | skinenigmang.c | 2 |
7 files changed, 31 insertions, 9 deletions
@@ -1,6 +1,9 @@ VDR Skin 'EnigmaNG' Revision History ------------------------------------------ +2012-xx-xx: Version 0.1.3 +- Added: Setup options to set width of signal information and progress bar in channel info OSD. + 2012-04-29: Version 0.1.2 - Changed: Use vdr fuctions to determine signal strength (Closes #811). - Added: Hungarian translation (Provided by István Füley). @@ -182,10 +182,17 @@ Setup Options channel info. "elapsed/remaining" will show both elapsed and remaining number of minutes. +- Width of progress bar + The width of the progress bar that visualizes the elapsed time of the current + event. + - Show signal info If set to yes the signal strength (top) and signal-to-noise ratio (bottom) will be shown at the bottom right side of the channel info OSD. +- Width of signal info + The width of the signal info. + - Show CA system as text Show used CA system (e.g. Cryptoworks) as text instead of symbol in the channel info OSD. @@ -58,7 +58,8 @@ cEnigmaConfig::cEnigmaConfig() : showAuxInfo(1), showLogo(1), showVps(1), showSy useTextEffects(0), scrollDelay(50), scrollPause(1500), scrollMode(0), blinkPause(1000), scrollInfo(1), scrollListItem(1), scrollOther(1), scrollTitle(1), dynOsd(0), statusLineMode(0), showWssSymbols(0), showStatusSymbols(0), showScrollbar(1), - showSignalInfo(0), showCaMode(0), drawRoundCorners(1), channelLogoWidth(80), channelLogoHeight(80) + showSignalInfo(0), showCaMode(0), drawRoundCorners(1), channelLogoWidth(80), channelLogoHeight(80), + signalInfoWidth(74), progressBarWidth(124) { memset(logoDir, 0, sizeof(logoDir)); memset(strImagesDir, 0, sizeof(strImagesDir)); @@ -149,6 +149,8 @@ public: int drawRoundCorners; int channelLogoWidth; int channelLogoHeight; + int signalInfoWidth; + int progressBarWidth; FontInfo allFonts[FONT_NUMFONTS]; }; @@ -231,10 +231,6 @@ THEME_CLR(Theme, clrSignalLowFg, 0xFFCC0000); #define MIN_DATEWIDTH 144 -// Minimum progress bar width in channel info -#define MIN_CI_PROGRESS 124 -// Minimum signal bar width in channel info -#define MIN_CI_SIGNALBAR 74 #define TinyGap 1 #define SmallGap 2 @@ -403,7 +399,7 @@ cSkinEnigmaDisplayChannel::cSkinEnigmaDisplayChannel(bool WithInfo) int w = pFontDate->Width(date); xDateLeft = xTitleRight - xIndent - w - SmallGap; #ifndef DISABLE_SIGNALINFO - xSignalBarLeft = EnigmaConfig.showSignalInfo ? (xBottomRight - xIndent - MIN_CI_SIGNALBAR) : -1; + xSignalBarLeft = EnigmaConfig.showSignalInfo ? (xBottomRight - xIndent - EnigmaConfig.signalInfoWidth) : -1; #endif // create osd @@ -659,7 +655,7 @@ void cSkinEnigmaDisplayChannel::DrawSymbols(const cChannel *Channel) } } - xFirstSymbol = DrawStatusSymbols(xBottomLeft + xIndent + MIN_CI_PROGRESS + Gap, xs, yBottomTop, yBottomBottom, Channel) - Gap; + xFirstSymbol = DrawStatusSymbols(xBottomLeft + xIndent + EnigmaConfig.progressBarWidth + Gap, xs, yBottomTop, yBottomBottom, Channel) - Gap; } #ifndef DISABLE_SIGNALINFO @@ -710,7 +706,7 @@ void cSkinEnigmaDisplayChannel::UpdateSignal() { if (snr < 0 && str < 0) return; - int bw = MIN_CI_SIGNALBAR; //45; + int bw = EnigmaConfig.signalInfoWidth; int xSignalBarRight = xSignalBarLeft + bw; #if VDRVERSNUM < 10719 @@ -930,7 +926,7 @@ void cSkinEnigmaDisplayChannel::SetEvents(const cEvent *Present, } // draw timebar int xBarLeft = xBottomLeft + xIndent; - int xBarWidth = MIN_CI_PROGRESS; + int xBarWidth = EnigmaConfig.progressBarWidth; int x = xBarLeft + SmallGap + (int)(ceil((float)(now) / (float)(total) * (float)(xBarWidth - SmallGap - SmallGap))); x = std::min(x, xBarLeft + xBarWidth - SmallGap - 1); osd->DrawRectangle(xBarLeft, yBottomTop + Gap, @@ -136,6 +136,8 @@ void cPluginSkinEnigmaSetup::Store(void) SetupStore("DrawRoundCorners", EnigmaConfig.drawRoundCorners); SetupStore("ChannelLogoWidth", EnigmaConfig.channelLogoWidth); SetupStore("ChannelLogoHeight", EnigmaConfig.channelLogoHeight); + SetupStore("SignalInfoWidth", EnigmaConfig.signalInfoWidth); + SetupStore("ProgressBarWidth", EnigmaConfig.progressBarWidth); char tmp[sizeof(EnigmaConfig.allFonts[0].Name) + 8]; for (int id = 0; id < FONT_NUMFONTS; id++) { @@ -226,11 +228,17 @@ cMenuSetupGeneral::cMenuSetupGeneral(cEnigmaConfig* Data) : cMenuSetupSubMenu(tr eOSState cMenuSetupGeneral::ProcessKey(eKeys Key) { int oldShowInfo = data->showInfo; +#ifndef DISABLE_SIGNALINFO + int oldShowSignalInfo = data->showSignalInfo; +#endif eOSState state = cMenuSetupSubMenu::ProcessKey(Key); if (Key != kNone && ((data->showInfo != oldShowInfo) +#ifndef DISABLE_SIGNALINFO + || (data->showSignalInfo != oldShowSignalInfo) +#endif )) { Set(); } @@ -268,8 +276,11 @@ void cMenuSetupGeneral::Set(void) Add(new cMenuEditStraItem(tr("Show recording's size"), &data->showRecSize, 3, showRecSizeTexts)); AddCategory(tr("Channel Info OSD")); Add(new cMenuEditStraItem(tr("Show remaining/elapsed time"), &data->showRemaining, 4, showRemainingTexts)); + Add(new cMenuEditIntItem(tr("Width of progress bar"), &data->progressBarWidth, 74, Setup.OSDWidth)); #ifndef DISABLE_SIGNALINFO Add(new cMenuEditBoolItem(tr("Show signal info"), &data->showSignalInfo)); + if (data->showSignalInfo) + Add(new cMenuEditIntItem(tr(" Width of signal info"), &data->signalInfoWidth, 74, Setup.OSDWidth)); #endif //DISABLE_SIGNALINFO Add(new cMenuEditBoolItem(tr("Show CA system as text"), &data->showCaMode)); diff --git a/skinenigmang.c b/skinenigmang.c index 577ceb7..0eabe3a 100644 --- a/skinenigmang.c +++ b/skinenigmang.c @@ -255,6 +255,8 @@ bool cPluginSkinEnigma::SetupParse(const char *OptionName, const char *Value) else if (!strcasecmp(OptionName, "DrawRoundCorners")) EnigmaConfig.drawRoundCorners = atoi(Value); else if (!strcasecmp(OptionName, "ChannelLogoWidth")) EnigmaConfig.channelLogoWidth = atoi(Value); else if (!strcasecmp(OptionName, "ChannelLogoHeight")) EnigmaConfig.channelLogoHeight = atoi(Value); + else if (!strcasecmp(OptionName, "SignalInfoWidth")) EnigmaConfig.signalInfoWidth = atoi(Value); + else if (!strcasecmp(OptionName, "ProgressBarWidth")) EnigmaConfig.progressBarWidth = atoi(Value); else return false; return true; |