diff options
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | config.c | 2 | ||||
-rw-r--r-- | config.h | 1 | ||||
-rw-r--r-- | displaychannel.c | 55 | ||||
-rw-r--r-- | displaychannel.h | 4 | ||||
-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 | 4 | ||||
-rw-r--r-- | setup.h | 1 |
10 files changed, 92 insertions, 11 deletions
@@ -188,4 +188,5 @@ Version 0.1.1 - changed stereo and ac3 icons in tracks display - Added RSS Feed support - Fixed crash on initial startup with xine plugin as output device -- Fixed crash / hang if menu is opened with small screen size +- Fixed crash / hang if menu is opened with small screen size +- Background of ChannelDisplay configurable also to cover channel logo @@ -20,6 +20,7 @@ cNopacityConfig::cNopacityConfig() { logoHeight = 200; logoExtension = "png"; logoBorder = 15; + backgroundStyle = 0; displaySignalStrength = 1; fontChannelHeaderSize = 0; fontChannelDateSize = 0; @@ -281,6 +282,7 @@ bool cNopacityConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "logoWidth") == 0) logoWidth = atoi(Value); else if (strcmp(Name, "logoHeight") == 0) logoHeight = atoi(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, "fontChannelHeaderSize") == 0) fontChannelHeaderSize = atoi(Value); else if (strcmp(Name, "fontChannelDateSize") == 0) fontChannelDateSize = atoi(Value); @@ -42,6 +42,7 @@ class cNopacityConfig { int logoWidth;
int logoHeight;
int logoBorder;
+ int backgroundStyle;
int displaySignalStrength;
int fontChannelHeaderSize;
int fontChannelDateSize;
diff --git a/displaychannel.c b/displaychannel.c index d9b03b3..f7a3690 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -38,6 +38,9 @@ cNopacityDisplayChannel::~cNopacityDisplayChannel() { osd->DestroyPixmap(pixmapBackgroundTop); osd->DestroyPixmap(pixmapBackgroundBottom); osd->DestroyPixmap(pixmapLogo); + osd->DestroyPixmap(pixmapLogoBackground); + osd->DestroyPixmap(pixmapLogoBackgroundTop); + osd->DestroyPixmap(pixmapLogoBackgroundBottom); osd->DestroyPixmap(pixmapChannelInfo); osd->DestroyPixmap(pixmapDate); if (withInfo) { @@ -122,13 +125,22 @@ void cNopacityDisplayChannel::CreatePixmaps(void) { switch (config.logoPosition) { case lpLeft: - pixmapLogo = osd->CreatePixmap(1, cRect(0, 0, config.logoWidth + 2 * config.logoBorder, height)); + pixmapLogoBackgroundTop = osd->CreatePixmap(1, cRect(config.channelBorderVertical, 0, infoX - config.channelBorderVertical, channelInfoHeight)); + pixmapLogoBackground = osd->CreatePixmap(1, cRect(config.channelBorderVertical, channelInfoHeight, infoX - config.channelBorderVertical, progressBarHeight + epgInfoHeight)); + pixmapLogoBackgroundBottom = osd->CreatePixmap(1, cRect(config.channelBorderVertical, streamInfoY, infoX - config.channelBorderVertical, streamInfoHeight)); + pixmapLogo = osd->CreatePixmap(2, cRect(0, 0, config.logoWidth + 2 * config.logoBorder, height)); break; case lpRight: - pixmapLogo = osd->CreatePixmap(1, cRect(infoX + infoWidth, 0, config.logoWidth + 2 * config.logoBorder, height)); + pixmapLogoBackgroundTop = osd->CreatePixmap(1, cRect(infoX + infoWidth, 0, cOsd::OsdWidth() - 2*config.channelBorderVertical - infoWidth, channelInfoHeight)); + pixmapLogoBackground = osd->CreatePixmap(1, cRect(infoX + infoWidth, channelInfoHeight, cOsd::OsdWidth() - 2*config.channelBorderVertical - infoWidth, progressBarHeight + epgInfoHeight)); + pixmapLogoBackgroundBottom = osd->CreatePixmap(1, cRect(infoX + infoWidth, streamInfoY, cOsd::OsdWidth() - 2*config.channelBorderVertical - infoWidth, streamInfoHeight)); + pixmapLogo = osd->CreatePixmap(2, cRect(infoX + infoWidth, 0, config.logoWidth + 2 * config.logoBorder, height)); break; case lpNone: pixmapLogo = osd->CreatePixmap(-1, cRect(0, 0, 1, 1)); + pixmapLogoBackground = osd->CreatePixmap(-1, cRect(0, 0, 1, 1)); + pixmapLogoBackgroundTop = osd->CreatePixmap(-1, cRect(0, 0, 1, 1)); + pixmapLogoBackgroundBottom = osd->CreatePixmap(-1, cRect(0, 0, 1, 1)); break; } @@ -138,6 +150,9 @@ void cNopacityDisplayChannel::CreatePixmaps(void) { pixmapChannelInfo->SetAlpha(0); pixmapDate->SetAlpha(0); pixmapLogo->SetAlpha(0); + pixmapLogoBackground->SetAlpha(0); + pixmapLogoBackgroundTop->SetAlpha(0); + pixmapLogoBackgroundBottom->SetAlpha(0); pixmapFooter->SetAlpha(0); pixmapStreamInfo->SetAlpha(0); pixmapStreamInfoBack->SetAlpha(0); @@ -167,15 +182,38 @@ void cNopacityDisplayChannel::DrawBackground(void){ if (withInfo) pixmapBackgroundMiddle->Fill(Theme.Color(clrChannelBackground)); DrawBlendedBackground(pixmapBackgroundBottom, Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend), false); - - pixmapBackgroundTop->DrawEllipse(cRect(0, 0, channelInfoHeight/2, channelInfoHeight/2), clrTransparent, -2); - pixmapBackgroundTop->DrawEllipse(cRect(infoWidth - channelInfoHeight/2, 0, channelInfoHeight/2, channelInfoHeight/2), clrTransparent, -1); - pixmapBackgroundBottom->DrawEllipse(cRect(0, streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2), clrTransparent, -3); - pixmapBackgroundBottom->DrawEllipse(cRect(infoWidth - streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2), clrTransparent, -4); + + if (config.backgroundStyle == bsFull) { + pixmapLogoBackground->Fill(Theme.Color(clrChannelBackground)); + DrawBlendedBackground(pixmapLogoBackgroundTop, Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend), true); + DrawBlendedBackground(pixmapLogoBackgroundBottom, Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend), false); + } else { + pixmapLogoBackgroundTop->Fill(clrTransparent); + pixmapLogoBackground->Fill(clrTransparent); + pixmapLogoBackgroundBottom->Fill(clrTransparent); + } + + if ((config.backgroundStyle == bsTrans) || ((config.logoPosition == lpNone))) { + pixmapBackgroundTop->DrawEllipse(cRect(0, 0, channelInfoHeight/2, channelInfoHeight/2), clrTransparent, -2); + pixmapBackgroundTop->DrawEllipse(cRect(infoWidth - channelInfoHeight/2, 0, channelInfoHeight/2, channelInfoHeight/2), clrTransparent, -1); + pixmapBackgroundBottom->DrawEllipse(cRect(0, streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2), clrTransparent, -3); + pixmapBackgroundBottom->DrawEllipse(cRect(infoWidth - streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2), clrTransparent, -4); + } else if ((config.backgroundStyle == bsFull) && (config.logoPosition == lpLeft)){ + pixmapLogoBackgroundTop->DrawEllipse(cRect(0, 0, channelInfoHeight/2, channelInfoHeight/2), clrTransparent, -2); + pixmapBackgroundTop->DrawEllipse(cRect(infoWidth - channelInfoHeight/2, 0, channelInfoHeight/2, channelInfoHeight/2), clrTransparent, -1); + pixmapLogoBackgroundBottom->DrawEllipse(cRect(0, streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2), clrTransparent, -3); + pixmapBackgroundBottom->DrawEllipse(cRect(infoWidth - streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2), clrTransparent, -4); + } else if ((config.backgroundStyle == bsFull) && (config.logoPosition == lpRight)){ + pixmapBackgroundTop->DrawEllipse(cRect(0, 0, channelInfoHeight/2, channelInfoHeight/2), clrTransparent, -2); + pixmapLogoBackgroundTop->DrawEllipse(cRect(pixmapLogoBackgroundTop->ViewPort().Width() - channelInfoHeight/2, 0, channelInfoHeight/2, channelInfoHeight/2), clrTransparent, -1); + pixmapBackgroundBottom->DrawEllipse(cRect(0, streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2), clrTransparent, -3); + pixmapLogoBackgroundBottom->DrawEllipse(cRect(pixmapLogoBackgroundBottom->ViewPort().Width() - streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2), clrTransparent, -4); + } pixmapChannelInfo->Fill(clrTransparent); pixmapDate->Fill(clrTransparent); pixmapLogo->Fill(clrTransparent); + pixmapFooter->Fill(clrTransparent); pixmapStreamInfo->Fill(clrTransparent); cImageLoader imgLoader; @@ -566,6 +604,9 @@ void cNopacityDisplayChannel::Action(void) { int Alpha = t * ALPHA_OPAQUE; pixmapBackgroundTop->SetAlpha(Alpha); pixmapBackgroundBottom->SetAlpha(Alpha); + pixmapLogoBackground->SetAlpha(Alpha); + pixmapLogoBackgroundTop->SetAlpha(Alpha); + pixmapLogoBackgroundBottom->SetAlpha(Alpha); pixmapLogo->SetAlpha(Alpha); pixmapChannelInfo->SetAlpha(Alpha); pixmapDate->SetAlpha(Alpha); diff --git a/displaychannel.h b/displaychannel.h index 3a5f924..c9b6b04 100644 --- a/displaychannel.h +++ b/displaychannel.h @@ -2,6 +2,7 @@ #define __NOPACITY_DISPLAYCHANNEL_H enum eLogoPosition {lpNone = 0, lpLeft, lpRight}; +enum eBackgroundStyle {bsTrans = 0, bsFull}; class cNopacityDisplayChannel : public cSkinDisplayChannel, cThread { private: @@ -29,6 +30,9 @@ private: cPixmap *pixmapChannelInfo; cPixmap *pixmapDate; cPixmap *pixmapLogo; + cPixmap *pixmapLogoBackground; + cPixmap *pixmapLogoBackgroundTop; + cPixmap *pixmapLogoBackgroundBottom; cPixmap *pixmapProgressBar; cPixmap *pixmapEPGInfo; cPixmap *pixmapFooter; diff --git a/po/de_DE.po b/po/de_DE.po index 7627d81..e332809 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-03-31 14:22+0200\n" +"POT-Creation-Date: 2013-04-07 13:48+0200\n" "PO-Revision-Date: 2012-11-11 17:49+0200\n" "Last-Translator: louis\n" "Language-Team: \n" @@ -314,6 +314,12 @@ msgstr "Weitere EPG Bilder in der detaillierten Aufnahmeansicht anzeigen" msgid "Folder Icon Size" msgstr "Order Icon Größe" +msgid "transparent channel logo" +msgstr "Kanallogo transparent" + +msgid "full osd width" +msgstr "volle OSD Breite" + msgid "do not display" msgstr "nicht anzeigen" @@ -332,6 +338,9 @@ msgstr "Breite des linken und rechten Rands" msgid "Bottom Border Height" msgstr "Höhe des unteren Rands" +msgid "Background Style" +msgstr "Hintergrund Stil" + msgid "Channel Logo Position" msgstr "Kanallogo Position" diff --git a/po/it_IT.po b/po/it_IT.po index 9c7011f..2f0f503 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-03-31 14:22+0200\n" +"POT-Creation-Date: 2013-04-07 13:48+0200\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n" "Language-Team: \n" @@ -317,6 +317,12 @@ msgstr "Mostra immagini EPG aggiuntivo nella vista dettagli registrazione" msgid "Folder Icon Size" msgstr "Dim. icona cartella" +msgid "transparent channel logo" +msgstr "" + +msgid "full osd width" +msgstr "" + msgid "do not display" msgstr "non mostrare" @@ -335,6 +341,9 @@ msgstr "Larghezza bordi sinistro e destro" msgid "Bottom Border Height" msgstr "Altezza bordo inferiore" +msgid "Background Style" +msgstr "" + msgid "Channel Logo Position" msgstr "Posizione logo canale" diff --git a/po/sk_SK.po b/po/sk_SK.po index 7513c1b..39bfc61 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-03-31 14:22+0200\n" +"POT-Creation-Date: 2013-04-07 13:48+0200\n" "PO-Revision-Date: 2013-03-12 15:59+0100\n" "Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n" "Language-Team: \n" @@ -317,6 +317,12 @@ msgstr "Zobrazi» ïal¹ie EPG obrázky v podrobnom zobrazení nahrávky" msgid "Folder Icon Size" msgstr "Veµkos» ikony prieèinku" +msgid "transparent channel logo" +msgstr "" + +msgid "full osd width" +msgstr "" + msgid "do not display" msgstr "nezobrazova»" @@ -335,6 +341,9 @@ msgstr "©írka µavého a pravého okraja" msgid "Bottom Border Height" msgstr "Vý¹ka spodného okraja" +msgid "Background Style" +msgstr "" + msgid "Channel Logo Position" msgstr "Pozícia loga kanálu" @@ -79,6 +79,7 @@ void cNopacitySetup::Store(void) { SetupStore("logoWidth", config.logoWidth); SetupStore("logoHeight", config.logoHeight); SetupStore("logoBorder", config.logoBorder); + SetupStore("backgroundStyle", config.backgroundStyle); SetupStore("displaySignalStrength", config.displaySignalStrength); SetupStore("channelFadeTime", config.channelFadeTime); SetupStore("fontChannelHeaderSize", config.fontChannelHeaderSize); @@ -435,6 +436,8 @@ void cNopacitySetupMenuDisplayRecordings::Set(void) { //----ChannelDisplay-------------------------------------------------------------------------------------------------------------- cNopacitySetupChannelDisplay::cNopacitySetupChannelDisplay(cNopacityConfig* data) : cMenuSetupSubMenu(tr("Channel Switching"), data) { + bgStyle[0] = tr("transparent channel logo"); + bgStyle[1] = tr("full osd width"); logoPos[0] = tr("do not display"); logoPos[1] = tr("left"); logoPos[2] = tr("right"); @@ -451,6 +454,7 @@ void cNopacitySetupChannelDisplay::Set(void) { Add(new cMenuEditIntItem(tr("Height of Channel Display (Percent of OSD Height)"), &tmpNopacityConfig->channelHeight, 15, 80)); Add(new cMenuEditIntItem(tr("Left & Right Border Width"), &tmpNopacityConfig->channelBorderVertical, 0, 300)); Add(new cMenuEditIntItem(tr("Bottom Border Height"), &tmpNopacityConfig->channelBorderBottom, 0, 300)); + Add(new cMenuEditStraItem(tr("Background Style"), &tmpNopacityConfig->backgroundStyle, 2, bgStyle)); Add(new cMenuEditStraItem(tr("Channel Logo Position"), &tmpNopacityConfig->logoPosition, 3, logoPos)); if (tmpNopacityConfig->logoPosition) { Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Channel Logo Width")), &tmpNopacityConfig->logoWidth, 30, 500)); @@ -78,6 +78,7 @@ class cNopacitySetupChannelDisplay : public cMenuSetupSubMenu { protected: const char *logoPos[3]; const char *progressStyleCurrentSchedule[2]; + const char *bgStyle[2]; void Set(void); public: cNopacitySetupChannelDisplay(cNopacityConfig *data); |