diff options
-rw-r--r-- | config.c | 6 | ||||
-rw-r--r-- | config.h | 3 | ||||
-rw-r--r-- | displaychannel.c | 61 | ||||
-rw-r--r-- | displaychannel.h | 2 | ||||
-rw-r--r-- | po/de_DE.po | 11 | ||||
-rw-r--r-- | po/it_IT.po | 11 | ||||
-rw-r--r-- | po/sk_SK.po | 11 | ||||
-rw-r--r-- | setup.c | 6 |
8 files changed, 81 insertions, 30 deletions
@@ -22,10 +22,13 @@ cNopacityConfig::cNopacityConfig() { logoBorder = 15; backgroundStyle = 0; displaySignalStrength = 1; + displayPrevNextChannelGroup = 1; fontChannelHeaderSize = 0; fontChannelDateSize = 0; fontEPGSize = 0; fontEPGSmallSize = 0; + fontChannelGroupSize = 0; + fontChannelGroupSmallSize = 0; resolutionIconSize = 100; statusIconSize = 64; progressCurrentSchedule = 0; @@ -298,10 +301,13 @@ bool cNopacityConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "logoBorder") == 0) logoBorder = atoi(Value); else if (strcmp(Name, "backgroundStyle") == 0) backgroundStyle = atoi(Value); else if (strcmp(Name, "displaySignalStrength") == 0) displaySignalStrength = atoi(Value); + else if (strcmp(Name, "displayPrevNextChannelGroup") == 0) displayPrevNextChannelGroup = atoi(Value); else if (strcmp(Name, "fontChannelHeaderSize") == 0) fontChannelHeaderSize = atoi(Value); else if (strcmp(Name, "fontChannelDateSize") == 0) fontChannelDateSize = atoi(Value); else if (strcmp(Name, "fontEPGSize") == 0) fontEPGSize = atoi(Value); else if (strcmp(Name, "fontEPGSmallSize") == 0) fontEPGSmallSize = atoi(Value); + else if (strcmp(Name, "fontChannelGroupSize") == 0) fontChannelGroupSize = atoi(Value); + else if (strcmp(Name, "fontChannelGroupSmallSize") == 0) fontChannelGroupSmallSize = atoi(Value); else if (strcmp(Name, "resolutionIconSize") == 0) resolutionIconSize = atoi(Value); else if (strcmp(Name, "statusIconSize") == 0) statusIconSize = atoi(Value); else if (strcmp(Name, "progressCurrentSchedule") == 0) progressCurrentSchedule = atoi(Value); @@ -45,10 +45,13 @@ class cNopacityConfig { int logoBorder;
int backgroundStyle;
int displaySignalStrength;
+ int displayPrevNextChannelGroup;
int fontChannelHeaderSize;
int fontChannelDateSize;
int fontEPGSize;
int fontEPGSmallSize;
+ int fontChannelGroupSize;
+ int fontChannelGroupSmallSize;
int resolutionIconSize;
int statusIconSize;
int progressCurrentSchedule;
diff --git a/displaychannel.c b/displaychannel.c index 41fb363..22d4b48 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -66,6 +66,8 @@ cNopacityDisplayChannel::~cNopacityDisplayChannel() { delete fontDate; delete fontEPG; delete fontEPGSmall; + delete fontChannelGroup; + delete fontChannelGroupSmall; delete osd; } } @@ -175,6 +177,8 @@ void cNopacityDisplayChannel::CreateFonts(void) { fontDate = cFont::CreateFont(config.fontName, channelInfoHeight/2 + config.fontChannelDateSize); fontEPG = cFont::CreateFont(config.fontName, epgInfoLineHeight + config.fontEPGSize); fontEPGSmall = cFont::CreateFont(config.fontName, epgInfoLineHeight - 6 + config.fontEPGSmallSize); + fontChannelGroup = cFont::CreateFont(config.fontName, epgInfoHeight/3 + config.fontChannelGroupSize); + fontChannelGroupSmall = cFont::CreateFont(config.fontName, epgInfoHeight/3 - 5 + config.fontChannelGroupSmallSize); } void cNopacityDisplayChannel::DrawBackground(void){ @@ -448,52 +452,55 @@ void cNopacityDisplayChannel::DrawChannelGroups(const cChannel *Channel, cString if (withInfo) { pixmapProgressBar->Fill(clrTransparent); pixmapEPGInfo->Fill(clrTransparent); - ySep = (epgInfoHeight-fontHeader->Height())/2 - fontHeader->Height()/2; + ySep = (epgInfoHeight-fontChannelGroup->Height())/2 - fontChannelGroup->Height()/2; infoPixmap = pixmapEPGInfo; } else { - ySep = (channelInfoHeight-fontHeader->Height())/2; + ySep = (channelInfoHeight - fontChannelGroup->Height())/2; infoPixmap = pixmapChannelInfo; } + int widthSep = fontChannelGroup->Width(*ChannelName); + int xSep = (config.displayPrevNextChannelGroup)?(infoWidth * 2 / 5):0; + infoPixmap->DrawText(cPoint(xSep, ySep), *ChannelName, Theme.Color(clrChannelHead), clrTransparent, fontChannelGroup); + if (config.logoPosition != lpNone) { + cImageLoader imgLoader; + cString separator = cString::sprintf("separatorlogos/%s", *ChannelName); + if (imgLoader.LoadLogo(*separator)) { + pixmapLogo->DrawImage(cPoint(config.logoBorder, (height-config.logoHeight)/2), imgLoader.GetImage()); + } else if (imgLoader.LoadIcon("skinIcons/Channelseparator", config.logoHeight)) { + pixmapLogo->DrawImage(cPoint(config.logoBorder + (config.logoWidth - config.logoHeight)/2, (height-config.logoHeight)/2), imgLoader.GetImage()); + } + } + + if (!config.displayPrevNextChannelGroup) + return; + cString prevChannelSep = GetChannelSep(Channel, true); cString nextChannelSep = GetChannelSep(Channel, false); bool prevAvailable = (strlen(*prevChannelSep) > 0)?true:false; bool nextAvailable = (strlen(*nextChannelSep) > 0)?true:false; - int widthSep = fontHeader->Width(*ChannelName); - int xSep = (infoWidth - widthSep)/2; - infoPixmap->DrawText(cPoint(xSep, ySep), *ChannelName, Theme.Color(clrChannelHead), clrTransparent, fontHeader); - int ySepNextPrev = ySep + (fontHeader->Height() - fontEPG->Height())/2; + int ySepNextPrev = ySep + (fontChannelGroup->Height() - fontChannelGroupSmall->Height())/2; if (prevAvailable) { - int xSymbol = xSep - fontHeader->Width(*prevSymbol); - infoPixmap->DrawText(cPoint(xSymbol, ySep), *prevSymbol, Theme.Color(clrChannelHead), clrTransparent, fontHeader); - int xSepPrev = xSymbol - fontEPG->Width(prevChannelSep); + int xSymbol = xSep - fontChannelGroup->Width(*prevSymbol); + infoPixmap->DrawText(cPoint(xSymbol, ySep), *prevSymbol, Theme.Color(clrChannelHead), clrTransparent, fontChannelGroup); + int xSepPrev = xSymbol - fontChannelGroupSmall->Width(prevChannelSep); if (xSepPrev < 0) { - prevChannelSep = CutText(*prevChannelSep, xSymbol, fontEPG).c_str(); - xSepPrev = xSymbol - fontEPG->Width(prevChannelSep); + prevChannelSep = CutText(*prevChannelSep, xSymbol, fontChannelGroupSmall).c_str(); + xSepPrev = xSymbol - fontChannelGroupSmall->Width(prevChannelSep); } - infoPixmap->DrawText(cPoint(xSepPrev, ySepNextPrev), *prevChannelSep, Theme.Color(clrChannelEPG), clrTransparent, fontEPG); + infoPixmap->DrawText(cPoint(xSepPrev, ySepNextPrev), *prevChannelSep, Theme.Color(clrChannelEPG), clrTransparent, fontChannelGroupSmall); } if (nextAvailable) { int xSymbol = xSep + widthSep; - infoPixmap->DrawText(cPoint(xSymbol, ySep), *nextSymbol, Theme.Color(clrChannelHead), clrTransparent, fontHeader); - int xSepNext = xSymbol + fontHeader->Width(*nextSymbol); + infoPixmap->DrawText(cPoint(xSymbol, ySep), *nextSymbol, Theme.Color(clrChannelHead), clrTransparent, fontChannelGroup); + int xSepNext = xSymbol + fontChannelGroup->Width(*nextSymbol); int spaceAvailable = infoPixmap->DrawPort().Width() - xSepNext; - if (fontEPG->Width(nextChannelSep) > spaceAvailable) { - nextChannelSep = CutText(*nextChannelSep, spaceAvailable, fontEPG).c_str(); - } - infoPixmap->DrawText(cPoint(xSepNext, ySepNextPrev), *nextChannelSep, Theme.Color(clrChannelEPG), clrTransparent, fontEPG); - } - - if (config.logoPosition != lpNone) { - cImageLoader imgLoader; - cString separator = cString::sprintf("separatorlogos/%s", *ChannelName); - if (imgLoader.LoadLogo(*separator)) { - pixmapLogo->DrawImage(cPoint(config.logoBorder, (height-config.logoHeight)/2), imgLoader.GetImage()); - } else if (imgLoader.LoadIcon("skinIcons/Channelseparator", config.logoHeight)) { - pixmapLogo->DrawImage(cPoint(config.logoBorder + (config.logoWidth - config.logoHeight)/2, (height-config.logoHeight)/2), imgLoader.GetImage()); + if (fontChannelGroupSmall->Width(nextChannelSep) > spaceAvailable) { + nextChannelSep = CutText(*nextChannelSep, spaceAvailable, fontChannelGroupSmall).c_str(); } + infoPixmap->DrawText(cPoint(xSepNext, ySepNextPrev), *nextChannelSep, Theme.Color(clrChannelEPG), clrTransparent, fontChannelGroupSmall); } } diff --git a/displaychannel.h b/displaychannel.h index 3fab23b..4da8564 100644 --- a/displaychannel.h +++ b/displaychannel.h @@ -62,6 +62,8 @@ private: cFont *fontEPG; cFont *fontEPGSmall; cFont *fontInfoline; + cFont *fontChannelGroup; + cFont *fontChannelGroupSmall; virtual void Action(void); void SetGeometry(void); void CreatePixmaps(void); diff --git a/po/de_DE.po b/po/de_DE.po index cc4611a..6f6c027 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: skinnopacity 0.0.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2013-04-14 16:39+0200\n" +"POT-Creation-Date: 2013-05-04 11:26+0200\n" "PO-Revision-Date: 2012-11-11 17:49+0200\n" "Last-Translator: louis\n" "Language-Team: \n" @@ -377,6 +377,9 @@ msgstr "Art der Zeitanzeige für die laufende Sendung" msgid "Display Signal Strength & Quality" msgstr "Signalstärke- und Qualität anzeigen" +msgid "Display previous and next Channel Group" +msgstr "Vorherige und nächste Kanalgruppe anzeigen" + msgid "Screen Resolution Icon Size" msgstr "Größe des Icons zur Anzeige der Bildschirmauflösung" @@ -389,6 +392,12 @@ msgstr "Schriftgröße anpassen - EPG Text" msgid "Adjust Font Size - EPG Infotext" msgstr "Schriftgröße anpassen - EPG Infotext" +msgid "Adjust Font Size - Channel Group" +msgstr "Schriftgräße Anpassen - Kanalgruppen" + +msgid "Adjust Font Size - Next/Prev Channel Group" +msgstr "Schriftgräße Anpassen - vorh./nächste Kanalgruppe" + msgid "Height of Replay Display (Percent of OSD Height)" msgstr "Höhe der Wiedergabe Anzeige (% der OSD Höhe)" diff --git a/po/it_IT.po b/po/it_IT.po index 4198e24..687359b 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: skinnopacity 0.0.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2013-04-14 16:39+0200\n" +"POT-Creation-Date: 2013-05-04 11:26+0200\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n" "Language-Team: \n" @@ -380,6 +380,9 @@ msgstr "" msgid "Display Signal Strength & Quality" msgstr "Mostra qualità e intensità segnale" +msgid "Display previous and next Channel Group" +msgstr "" + msgid "Screen Resolution Icon Size" msgstr "Dim. icona risoluzione schermo" @@ -392,6 +395,12 @@ msgstr "Adatta dim. caratteri - Testo EPG" msgid "Adjust Font Size - EPG Infotext" msgstr "Adatta dim. caratteri - Info testo EPG" +msgid "Adjust Font Size - Channel Group" +msgstr "" + +msgid "Adjust Font Size - Next/Prev Channel Group" +msgstr "" + msgid "Height of Replay Display (Percent of OSD Height)" msgstr "Altezza di Mostra riproduzione (% altezza OSD)" diff --git a/po/sk_SK.po b/po/sk_SK.po index 7b45a2f..c981db1 100644 --- a/po/sk_SK.po +++ b/po/sk_SK.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-skinnopacity 0.0.6\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2013-04-14 16:39+0200\n" +"POT-Creation-Date: 2013-05-04 11:26+0200\n" "PO-Revision-Date: 2013-03-12 15:59+0100\n" "Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n" "Language-Team: \n" @@ -380,6 +380,9 @@ msgstr "" msgid "Display Signal Strength & Quality" msgstr "Zobrazi» silu a kvalitu signálu" +msgid "Display previous and next Channel Group" +msgstr "" + msgid "Screen Resolution Icon Size" msgstr "Veµkos» ikony rozlí¹enia obrazovky" @@ -392,6 +395,12 @@ msgstr "Nastavenie veµkos»i písma - EPG text" msgid "Adjust Font Size - EPG Infotext" msgstr "Nastavenie veµkos»i písma - EPG informaèný text" +msgid "Adjust Font Size - Channel Group" +msgstr "" + +msgid "Adjust Font Size - Next/Prev Channel Group" +msgstr "" + msgid "Height of Replay Display (Percent of OSD Height)" msgstr "" @@ -81,11 +81,14 @@ void cNopacitySetup::Store(void) { SetupStore("logoBorder", config.logoBorder); SetupStore("backgroundStyle", config.backgroundStyle); SetupStore("displaySignalStrength", config.displaySignalStrength); + SetupStore("displayPrevNextChannelGroup", config.displayPrevNextChannelGroup); SetupStore("channelFadeTime", config.channelFadeTime); SetupStore("fontChannelHeaderSize", config.fontChannelHeaderSize); SetupStore("fontChannelDateSize", config.fontChannelDateSize); SetupStore("fontEPGSize", config.fontEPGSize); SetupStore("fontEPGSmallSize", config.fontEPGSmallSize); + SetupStore("fontChannelGroupSize", config.fontChannelGroupSize); + SetupStore("fontChannelGroupSmallSize", config.fontChannelGroupSmallSize); SetupStore("resolutionIconSize", config.resolutionIconSize); SetupStore("statusIconSize", config.statusIconSize); SetupStore("progressCurrentSchedule", config.progressCurrentSchedule); @@ -475,12 +478,15 @@ void cNopacitySetupChannelDisplay::Set(void) { } Add(new cMenuEditStraItem(tr("Kind of time display for current schedule"), &tmpNopacityConfig->progressCurrentSchedule, 2, progressStyleCurrentSchedule)); Add(new cMenuEditBoolItem(tr("Display Signal Strength & Quality"), &tmpNopacityConfig->displaySignalStrength)); + Add(new cMenuEditBoolItem(tr("Display previous and next Channel Group"), &tmpNopacityConfig->displayPrevNextChannelGroup)); Add(new cMenuEditIntItem(tr("Screen Resolution Icon Size"), &tmpNopacityConfig->resolutionIconSize, 30, 200)); Add(new cMenuEditIntItem(tr("Status Icons Size"), &tmpNopacityConfig->statusIconSize, 30, 150)); Add(new cMenuEditIntItem(tr("Adjust Font Size - Header"), &tmpNopacityConfig->fontChannelHeaderSize, -20, 20)); Add(new cMenuEditIntItem(tr("Adjust Font Size - Date"), &tmpNopacityConfig->fontChannelDateSize, -20, 20)); Add(new cMenuEditIntItem(tr("Adjust Font Size - EPG Text"), &tmpNopacityConfig->fontEPGSize, -20, 20)); Add(new cMenuEditIntItem(tr("Adjust Font Size - EPG Infotext"), &tmpNopacityConfig->fontEPGSmallSize, -20, 20)); + Add(new cMenuEditIntItem(tr("Adjust Font Size - Channel Group"), &tmpNopacityConfig->fontChannelGroupSize, -20, 20)); + Add(new cMenuEditIntItem(tr("Adjust Font Size - Next/Prev Channel Group"), &tmpNopacityConfig->fontChannelGroupSmallSize, -20, 20)); SetCurrent(Get(currentItem)); Display(); } |