summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY4
-rw-r--r--config.c6
-rw-r--r--config.h3
-rw-r--r--displaymenu.c2
-rw-r--r--displaymenuview.c22
-rw-r--r--displaymenuview.h2
-rw-r--r--menudetailview.c4
-rw-r--r--menuitem.c38
-rw-r--r--menuitem.h2
-rw-r--r--po/ca_ES.po17
-rw-r--r--po/de_DE.po17
-rw-r--r--po/it_IT.po17
-rw-r--r--po/sk_SK.po17
-rw-r--r--setup.c10
-rw-r--r--setup.h2
-rw-r--r--textwindow.c183
-rw-r--r--textwindow.h9
-rw-r--r--themes/nOpacity-darkred.theme2
18 files changed, 333 insertions, 24 deletions
diff --git a/HISTORY b/HISTORY
index 3f62edb..664678f 100644
--- a/HISTORY
+++ b/HISTORY
@@ -269,3 +269,7 @@ Version 0.1.4
Feature 1469)
- added separate configurable border around detailed epg view and detailed
recording view
+- new "fullscreen" display mode in narrow schedules and recordings view. If
+ fullscreen mode is configured in plugin setup, the right area next to the
+ list of events /recordings is completely used to display immeditately the
+ detailed information of the selected event / recording.
diff --git a/config.c b/config.c
index 7a44657..586f6fd 100644
--- a/config.c
+++ b/config.c
@@ -127,6 +127,8 @@ cNopacityConfig::cNopacityConfig() {
menuRecFolderSize = 128;
borderDetailedEPG = 30;
borderDetailedRecordings = 30;
+ menuSchedulesWindowMode = 0;
+ menuRecordingsWindowMode = 0;
fontHeader = 0;
fontDate = 0;
fontMenuitemLarge = 0;
@@ -150,6 +152,7 @@ cNopacityConfig::cNopacityConfig() {
fontDetailViewHeader = 0;
fontDetailViewHeaderLarge = 0;
fontEPGInfoWindow = 0;
+ fontEPGInfoWindowLarge = 0;
//RSS Feeds
displayRSSFeed = 0;
rssFeedHeight = 5;
@@ -410,6 +413,8 @@ bool cNopacityConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "menuRecFolderSize") == 0) menuRecFolderSize = atoi(Value);
else if (strcmp(Name, "borderDetailedEPG") == 0) borderDetailedEPG = atoi(Value);
else if (strcmp(Name, "borderDetailedRecordings") == 0) borderDetailedRecordings = atoi(Value);
+ else if (strcmp(Name, "menuSchedulesWindowMode") == 0) menuSchedulesWindowMode = atoi(Value);
+ else if (strcmp(Name, "menuRecordingsWindowMode") == 0) menuRecordingsWindowMode = atoi(Value);
else if (strcmp(Name, "fontHeader") == 0) fontHeader = atoi(Value);
else if (strcmp(Name, "fontDate") == 0) fontDate = atoi(Value);
else if (strcmp(Name, "fontMenuitemLarge") == 0) fontMenuitemLarge = atoi(Value);
@@ -433,6 +438,7 @@ bool cNopacityConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "fontDetailViewHeader") == 0) fontDetailViewHeader = atoi(Value);
else if (strcmp(Name, "fontDetailViewHeaderLarge") == 0) fontDetailViewHeaderLarge = atoi(Value);
else if (strcmp(Name, "fontEPGInfoWindow") == 0) fontEPGInfoWindow = atoi(Value);
+ else if (strcmp(Name, "fontEPGInfoWindowLarge") == 0) fontEPGInfoWindowLarge = atoi(Value);
else if (strcmp(Name, "displayRSSFeed") == 0) displayRSSFeed = atoi(Value);
else if (strcmp(Name, "rssFeedHeight") == 0) rssFeedHeight = atoi(Value);
else if (strcmp(Name, "fontRssFeed") == 0) fontRssFeed = atoi(Value);
diff --git a/config.h b/config.h
index 146194e..c51bd58 100644
--- a/config.h
+++ b/config.h
@@ -160,6 +160,8 @@ class cNopacityConfig {
int menuRecFolderSize;
int borderDetailedEPG;
int borderDetailedRecordings;
+ int menuSchedulesWindowMode;
+ int menuRecordingsWindowMode;
int fontHeader;
int fontDate;
int fontMenuitemLarge;
@@ -183,6 +185,7 @@ class cNopacityConfig {
int fontDetailViewHeader;
int fontDetailViewHeaderLarge;
int fontEPGInfoWindow;
+ int fontEPGInfoWindowLarge;
//RSS Feeds
std::vector<RssFeed> rssFeeds;
int displayRSSFeed;
diff --git a/displaymenu.c b/displaymenu.c
index 2fe33ef..75b0016 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -402,6 +402,7 @@ bool cNopacityDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Cur
item->SetFont(menuView->GetMenuItemFont(mcSchedule));
item->SetFontSmall(menuView->GetMenuItemFontSmall(mcSchedule));
item->SetFontEPGWindow(menuView->GetEPGWindowFont());
+ item->SetFontEPGWindowLarge(menuView->GetEPGWindowFontLarge());
int spaceTop = menuView->GetMenuTop(currentNumItems, itemSize.Y());
item->SetGeometry(Index, spaceTop, menuView->GetMenuItemLeft(itemSize.X()), itemSize.X(), itemSize.Y(), menuView->spaceMenu);
item->SetTextWindow(menuView->GetDescriptionTextWindowSize(mcSchedule));
@@ -518,6 +519,7 @@ bool cNopacityDisplayMenu::SetItemRecording(const cRecording *Recording, int Ind
item->SetFont(menuView->GetMenuItemFont(mcRecording));
item->SetFontSmall(menuView->GetMenuItemFontSmall(mcRecording));
item->SetFontEPGWindow(menuView->GetEPGWindowFont());
+ item->SetFontEPGWindowLarge(menuView->GetEPGWindowFontLarge());
int spaceTop = menuView->GetMenuTop(currentNumItems, itemSize.Y());
item->SetGeometry(Index, spaceTop, menuView->GetMenuItemLeft(itemSize.X()), itemSize.X(), itemSize.Y(), menuView->spaceMenu);
item->SetTextWindow(menuView->GetDescriptionTextWindowSize(mcRecording));
diff --git a/displaymenuview.c b/displaymenuview.c
index ab4c9b6..55399f3 100644
--- a/displaymenuview.c
+++ b/displaymenuview.c
@@ -44,6 +44,7 @@ cNopacityDisplayMenuView::~cNopacityDisplayMenuView(void) {
delete fontButtons;
delete fontMessage;
delete fontEPGInfoWindow;
+ delete fontEPGInfoWindowLarge;
delete fontRssFeed;
}
@@ -102,13 +103,23 @@ void cNopacityDisplayMenuView::SetDescriptionTextWindowSize(void) {
int xSchedules = (config.menuAdjustLeft) ? (2 * spaceMenu + contentWidthSchedules + widthScrollbar) : (spaceMenu);
int xRecordings = (config.menuAdjustLeft) ? (2 * spaceMenu + contentWidthRecordings + widthScrollbar) : (spaceMenu);
int xChannels = (config.menuAdjustLeft) ? (2 * spaceMenu + contentWidthChannels + widthScrollbar) : (spaceMenu);
- int height = config.menuHeightInfoWindow * (contentHeight - 2*spaceMenu) / 100;
+
+ int heightFull = contentHeight - 2*spaceMenu;
+ int height = config.menuHeightInfoWindow * heightFull / 100;
int y = headerHeight + (contentHeight - height - spaceMenu);
+ int yFullScreen = headerHeight + spaceMenu;
+
int widthSchedules = (config.menuAdjustLeft) ? (osdWidth - xSchedules - spaceMenu) : (osdWidth - contentWidthSchedules - widthScrollbar - 2 * spaceMenu);
int widthRecordings = (config.menuAdjustLeft) ? (osdWidth - xRecordings - spaceMenu) : (osdWidth - contentWidthRecordings - widthScrollbar - 2 * spaceMenu);
int widthChannels = (config.menuAdjustLeft) ? (osdWidth - xChannels - spaceMenu) : (osdWidth - contentWidthChannels - widthScrollbar - 2 * spaceMenu);
- textWindowSizeSchedules = cRect(xSchedules,y,widthSchedules,height);
- textWindowSizeRecordings = cRect(xRecordings,y,widthRecordings,height);
+ if (config.menuSchedulesWindowMode == 0)
+ textWindowSizeSchedules = cRect(xSchedules,y,widthSchedules,height);
+ else
+ textWindowSizeSchedules = cRect(xSchedules,yFullScreen,widthSchedules,heightFull);
+ if (config.menuRecordingsWindowMode == 0)
+ textWindowSizeRecordings = cRect(xRecordings,y,widthRecordings,height);
+ else
+ textWindowSizeRecordings = cRect(xRecordings,yFullScreen,widthRecordings,heightFull);
textWindowSizeChannels = cRect(xChannels,y,widthChannels,height);
}
@@ -247,6 +258,7 @@ void cNopacityDisplayMenuView::CreateFonts(void) {
fontButtons = cFont::CreateFont(config.fontName, buttonHeight*0.8 + config.fontButtons);
fontMessage = cFont::CreateFont(config.fontName, messageHeight / 3 + config.fontMessageMenu);
fontEPGInfoWindow = cFont::CreateFont(config.fontName, contentHeight / 30 + config.fontEPGInfoWindow);
+ fontEPGInfoWindowLarge = cFont::CreateFont(config.fontName, contentHeight / 20 + config.fontEPGInfoWindowLarge);
fontRssFeed = cFont::CreateFont(config.fontName, (rssFeedHeight / 2) + 3 + config.fontRssFeed);
}
@@ -291,6 +303,10 @@ cFont *cNopacityDisplayMenuView::GetEPGWindowFont(void) {
return fontEPGInfoWindow;
}
+cFont *cNopacityDisplayMenuView::GetEPGWindowFontLarge(void) {
+ return fontEPGInfoWindowLarge;
+}
+
void cNopacityDisplayMenuView::GetMenuItemSize(eMenuCategory menuCat, cPoint *itemSize) {
int itemWidth = 0;
int itemHeight = 0;
diff --git a/displaymenuview.h b/displaymenuview.h
index e2c2bfb..139404e 100644
--- a/displaymenuview.h
+++ b/displaymenuview.h
@@ -42,6 +42,7 @@ class cNopacityDisplayMenuView {
cFont *fontButtons;
cFont *fontMessage;
cFont *fontEPGInfoWindow;
+ cFont *fontEPGInfoWindowLarge;
cFont *fontRssFeed;
int osdWidth, osdHeight;
int osdLeft, osdTop;
@@ -85,6 +86,7 @@ class cNopacityDisplayMenuView {
cFont *GetMenuItemFont(eMenuCategory menuCat);
cFont *GetMenuItemFontSmall(eMenuCategory menuCat);
cFont *GetEPGWindowFont(void);
+ cFont *GetEPGWindowFontLarge(void);
void GetMenuItemSize(eMenuCategory menuCat, cPoint *itemSize);
int GetMaxItems(eMenuCategory menuCat);
int GetMenuTop(int numItems, int itemHeight);
diff --git a/menudetailview.c b/menudetailview.c
index abf833d..1371910 100644
--- a/menudetailview.c
+++ b/menudetailview.c
@@ -825,8 +825,8 @@ void cNopacityMenuDetailRecordingView::DrawHeader(void) {
const char *Title = info->Title();
if (isempty(Title))
Title = recording->Name();
- cTextWrapper title;
- title.Set(Title, fontHeaderLarge, widthTextHeader);
+ cTextWrapper title;
+ title.Set(Title, fontHeaderLarge, widthTextHeader);
int currentLineHeight = lineHeight;
for (int i=0; i < title.Lines(); i++) {
pixmapHeader->DrawText(cPoint(border, currentLineHeight), title.GetLine(i), Theme.Color(clrMenuFontDetailViewHeaderTitle), clrTransparent, fontHeaderLarge);
diff --git a/menuitem.c b/menuitem.c
index 6d17892..81d590f 100644
--- a/menuitem.c
+++ b/menuitem.c
@@ -477,11 +477,20 @@ void cNopacityScheduleMenuItem::Render() {
infoTextWindow = NULL;
}
if (current && Event) {
- infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow, vidWin);
- infoTextWindow->SetGeometry(textWindow);
- infoTextWindow->SetText(Event->Description());
- infoTextWindow->SetPoster(Event, false);
- infoTextWindow->Start();
+ if (config.menuSchedulesWindowMode == 0) {
+ //window mode
+ infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow, vidWin);
+ infoTextWindow->SetGeometry(textWindow);
+ infoTextWindow->SetText(Event->Description());
+ infoTextWindow->SetPoster(Event, false);
+ infoTextWindow->Start();
+ } else {
+ //fullscreen mode
+ infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow, fontEPGWindowLarge);
+ infoTextWindow->SetGeometry(textWindow);
+ infoTextWindow->SetPoster(Event, false, true);
+ infoTextWindow->SetEvent(Event);
+ }
}
} else {
if (Event) {
@@ -1268,11 +1277,20 @@ void cNopacityRecordingMenuItem::Render() {
infoTextWindow = NULL;
}
if (current) {
- infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow, vidWin);
- infoTextWindow->SetGeometry(textWindow);
- infoTextWindow->SetText(Recording->Info()->Description());
- infoTextWindow->SetPoster(Recording->Info()->GetEvent(), true);
- infoTextWindow->Start();
+ if (config.menuRecordingsWindowMode == 0) {
+ //window mode
+ infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow, vidWin);
+ infoTextWindow->SetGeometry(textWindow);
+ infoTextWindow->SetText(Recording->Info()->Description());
+ infoTextWindow->SetPoster(Recording->Info()->GetEvent(), true);
+ infoTextWindow->Start();
+ } else {
+ //fullscreen mode
+ infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow, fontEPGWindowLarge);
+ infoTextWindow->SetGeometry(textWindow);
+ infoTextWindow->SetPoster(Recording->Info()->GetEvent(), true, true);
+ infoTextWindow->SetRecording(Recording);
+ }
}
}
}
diff --git a/menuitem.h b/menuitem.h
index b4c0aaf..1197091 100644
--- a/menuitem.h
+++ b/menuitem.h
@@ -17,6 +17,7 @@ protected:
cFont *font;
cFont *fontSmall;
cFont *fontEPGWindow;
+ cFont *fontEPGWindowLarge;
int width, height;
int top, left;
int spaceMenu;
@@ -43,6 +44,7 @@ public:
void SetFont(cFont *font) {this->font = font;}
void SetFontSmall(cFont *fontSmall) {this->fontSmall = fontSmall;}
void SetFontEPGWindow(cFont *font) {this->fontEPGWindow = font;}
+ void SetFontEPGWindowLarge(cFont *font) {this->fontEPGWindowLarge = font;}
void SetCurrent(bool cur);
void SetAlpha(int alpha) {this->pixmap->SetAlpha(alpha);}
void SetAlphaIcon(int alpha) {if (pixmapIcon) this->pixmapIcon->SetAlpha(alpha);}
diff --git a/po/ca_ES.po b/po/ca_ES.po
index 9f06ca2..bebf53a 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.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-09-14 15:23+0200\n"
+"POT-Creation-Date: 2013-09-14 17:27+0200\n"
"PO-Revision-Date: 2013-03-19 22:56+0100\n"
"Last-Translator: Gabychan <gbonich@gmail.com>\n"
"Language-Team: \n"
@@ -284,9 +284,18 @@ msgstr "sempre"
msgid "only if no tvscraper media available"
msgstr ""
+msgid "window"
+msgstr ""
+
+msgid "full screen"
+msgstr ""
+
msgid "Use narrow menu"
msgstr "Utilitza menú limitat"
+msgid "Mode of EPG Window"
+msgstr ""
+
msgid "EPG Window Fade-In Time in ms (Zero for switching off fading)"
msgstr "Fosa d'entrada finestra EPG, temps en ms (0 per desactivació)"
@@ -347,6 +356,9 @@ msgstr "Ajusta mida de la Font - Element petit de menú"
msgid "Adjust Font Size - EPG Info Window"
msgstr "Ajusta mida de la Font - Finestra Info EPG"
+msgid "Adjust Font Size - EPG Info Window Header"
+msgstr ""
+
msgid "Transponder Information"
msgstr "Informació Transponedor"
@@ -365,6 +377,9 @@ msgstr ""
msgid "Number of EPG Entries in Schedules Info Window"
msgstr "Nombre d'entrades EPG a la Finestra de Programació"
+msgid "Mode of recording Window"
+msgstr ""
+
msgid "Border around detailed recording view"
msgstr ""
diff --git a/po/de_DE.po b/po/de_DE.po
index de4193b..a1e1838 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-09-14 15:23+0200\n"
+"POT-Creation-Date: 2013-09-14 17:27+0200\n"
"PO-Revision-Date: 2012-11-11 17:49+0200\n"
"Last-Translator: louis\n"
"Language-Team: \n"
@@ -281,9 +281,18 @@ msgstr "immer"
msgid "only if no tvscraper media available"
msgstr "falls keine tvscraper medien verfügbar"
+msgid "window"
+msgstr "Fenster"
+
+msgid "full screen"
+msgstr "Vollbild"
+
msgid "Use narrow menu"
msgstr "Schmales Menü verwenden"
+msgid "Mode of EPG Window"
+msgstr "EPG Fenster Modus"
+
msgid "EPG Window Fade-In Time in ms (Zero for switching off fading)"
msgstr "Fade-In Zeit des EPG Fensters in ms (Null zum Abschalten)"
@@ -344,6 +353,9 @@ msgstr "Schriftgröße anpassen - Menüelement klein"
msgid "Adjust Font Size - EPG Info Window"
msgstr "Schriftgröße anpassen - EPG Infofenster"
+msgid "Adjust Font Size - EPG Info Window Header"
+msgstr ""
+
msgid "Transponder Information"
msgstr "Transponder Information"
@@ -362,6 +374,9 @@ msgstr "Programm mit Zeitinformation anzeigen"
msgid "Number of EPG Entries in Schedules Info Window"
msgstr "Anzahl der EPG Einträge im Programm Info Fenster"
+msgid "Mode of recording Window"
+msgstr "Aufnahme Fenster Modus"
+
msgid "Border around detailed recording view"
msgstr "Rahmen um detailierte Aufnahmeansicht"
diff --git a/po/it_IT.po b/po/it_IT.po
index 8f18df7..41718de 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-09-14 15:23+0200\n"
+"POT-Creation-Date: 2013-09-14 17:27+0200\n"
"PO-Revision-Date: 2013-03-19 22:56+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: \n"
@@ -284,9 +284,18 @@ msgstr "sempre"
msgid "only if no tvscraper media available"
msgstr ""
+msgid "window"
+msgstr ""
+
+msgid "full screen"
+msgstr ""
+
msgid "Use narrow menu"
msgstr "Usa menu ridotto"
+msgid "Mode of EPG Window"
+msgstr ""
+
msgid "EPG Window Fade-In Time in ms (Zero for switching off fading)"
msgstr "Tempo comparsa finestra EPG in ms (0 per disattivazione)"
@@ -347,6 +356,9 @@ msgstr "Adatta dim. caratteri - Voce menu piccolo"
msgid "Adjust Font Size - EPG Info Window"
msgstr "Adatta dim. caratteri - Finestra info EPG"
+msgid "Adjust Font Size - EPG Info Window Header"
+msgstr ""
+
msgid "Transponder Information"
msgstr ""
@@ -365,6 +377,9 @@ msgstr ""
msgid "Number of EPG Entries in Schedules Info Window"
msgstr ""
+msgid "Mode of recording Window"
+msgstr ""
+
msgid "Border around detailed recording view"
msgstr ""
diff --git a/po/sk_SK.po b/po/sk_SK.po
index fefd3e7..f2eef89 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-09-14 15:23+0200\n"
+"POT-Creation-Date: 2013-09-14 17:27+0200\n"
"PO-Revision-Date: 2013-03-12 15:59+0100\n"
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
"Language-Team: \n"
@@ -284,9 +284,18 @@ msgstr "v¾dy"
msgid "only if no tvscraper media available"
msgstr ""
+msgid "window"
+msgstr ""
+
+msgid "full screen"
+msgstr ""
+
msgid "Use narrow menu"
msgstr "Pou¾i» úzku ponuku"
+msgid "Mode of EPG Window"
+msgstr ""
+
msgid "EPG Window Fade-In Time in ms (Zero for switching off fading)"
msgstr "Èas efektu zmiznutia EPG okna v ms (nula vypne efekt)"
@@ -347,6 +356,9 @@ msgstr "Nastavenie veµkos»i písma - Malé polo¾ky ponuky"
msgid "Adjust Font Size - EPG Info Window"
msgstr "Nastavenie veµkos»i písma - EPG informaèné okno"
+msgid "Adjust Font Size - EPG Info Window Header"
+msgstr ""
+
msgid "Transponder Information"
msgstr ""
@@ -365,6 +377,9 @@ msgstr ""
msgid "Number of EPG Entries in Schedules Info Window"
msgstr ""
+msgid "Mode of recording Window"
+msgstr ""
+
msgid "Border around detailed recording view"
msgstr ""
diff --git a/setup.c b/setup.c
index 35a7a42..bc758fb 100644
--- a/setup.c
+++ b/setup.c
@@ -182,6 +182,8 @@ void cNopacitySetup::Store(void) {
SetupStore("menuRecFolderSize", config.menuRecFolderSize);
SetupStore("borderDetailedEPG", config.borderDetailedEPG);
SetupStore("borderDetailedRecordings", config.borderDetailedRecordings);
+ SetupStore("menuSchedulesWindowMode", config.menuSchedulesWindowMode);
+ SetupStore("menuRecordingsWindowMode", config.menuRecordingsWindowMode);
SetupStore("fontHeader", config.fontHeader);
SetupStore("fontDate", config.fontDate);
SetupStore("fontMenuitemLarge", config.fontMenuitemLarge);
@@ -205,6 +207,7 @@ void cNopacitySetup::Store(void) {
SetupStore("fontDetailViewHeader", config.fontDetailViewHeader);
SetupStore("fontDetailViewHeaderLarge", config.fontDetailViewHeaderLarge);
SetupStore("fontEPGInfoWindow", config.fontEPGInfoWindow);
+ SetupStore("fontEPGInfoWindowLarge", config.fontEPGInfoWindowLarge);
SetupStore("displayRSSFeed", config.displayRSSFeed);
SetupStore("rssFeedHeight", config.rssFeedHeight);
SetupStore("rssFeed[0]", config.rssFeed[0]);
@@ -356,6 +359,8 @@ cNopacitySetupMenuDisplaySchedules::cNopacitySetupMenuDisplaySchedules(cNopacity
displayEPGPictures[0] = tr("never");
displayEPGPictures[1] = tr("always");
displayEPGPictures[2] = tr("only if no tvscraper media available");
+ windowMode[0] = tr("window");
+ windowMode[1] = tr("full screen");
Set();
}
@@ -368,6 +373,7 @@ void cNopacitySetupMenuDisplaySchedules::Set(void) {
Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), &tmpNopacityConfig->menuWidthSchedules, 10, 97));
Add(new cMenuEditIntItem(tr("Channel Logo Width"), &tmpNopacityConfig->menuItemLogoWidth, 30, 200));
Add(new cMenuEditIntItem(tr("Channel Logo Height"), &tmpNopacityConfig->menuItemLogoHeight, 30, 200));
+ Add(new cMenuEditStraItem(tr("Mode of EPG Window"), &tmpNopacityConfig->menuSchedulesWindowMode, 2, windowMode));
Add(new cMenuEditIntItem(tr("EPG Window Fade-In Time in ms (Zero for switching off fading)"), &tmpNopacityConfig->menuEPGWindowFadeTime, 0, 1000));
Add(new cMenuEditIntItem(tr("EPG Window Display Delay in s"), &tmpNopacityConfig->menuInfoTextDelay, 0, 10));
Add(new cMenuEditIntItem(tr("EPG Window Scroll Delay in s"), &tmpNopacityConfig->menuInfoScrollDelay, 0, 10));
@@ -391,6 +397,7 @@ void cNopacitySetupMenuDisplaySchedules::Set(void) {
Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item"), &tmpNopacityConfig->fontMenuitemSchedule, -20, 20));
Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item Small"), &tmpNopacityConfig->fontMenuitemScheduleSmall, -20, 20));
Add(new cMenuEditIntItem(tr("Adjust Font Size - EPG Info Window"), &tmpNopacityConfig->fontEPGInfoWindow, -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - EPG Info Window Header"), &tmpNopacityConfig->fontEPGInfoWindowLarge, -20, 20));
SetCurrent(Get(currentItem));
Display();
@@ -450,6 +457,8 @@ cNopacitySetupMenuDisplayRecordings::cNopacitySetupMenuDisplayRecordings(cNopaci
displayEPGPictures[0] = tr("never");
displayEPGPictures[1] = tr("always");
displayEPGPictures[2] = tr("only if no tvscraper media available");
+ windowMode[0] = tr("window");
+ windowMode[1] = tr("full screen");
Set();
}
@@ -460,6 +469,7 @@ void cNopacitySetupMenuDisplayRecordings::Set(void) {
Add(new cMenuEditBoolItem(tr("Use narrow menu"), &tmpNopacityConfig->narrowRecordingMenu));
if (tmpNopacityConfig->narrowRecordingMenu)
Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), &tmpNopacityConfig->menuWidthRecordings, 10, 97));
+ Add(new cMenuEditStraItem(tr("Mode of recording Window"), &tmpNopacityConfig->menuRecordingsWindowMode, 2, windowMode));
Add(new cMenuEditIntItem(tr("Border around detailed recording view"), &tmpNopacityConfig->borderDetailedRecordings, 1, 300));
Add(new cMenuEditStraItem(tr("Display additional EPG Pictures in detailed recording View"), &tmpNopacityConfig->displayAdditionalRecEPGPictures, 3, displayEPGPictures));
if (tmpNopacityConfig->displayAdditionalRecEPGPictures)
diff --git a/setup.h b/setup.h
index 34d4d90..33f4f35 100644
--- a/setup.h
+++ b/setup.h
@@ -51,6 +51,7 @@ class cNopacitySetupMenuDisplaySchedules : public cMenuSetupSubMenu {
const char *useSubtitleRerunTexts[3];
const char *scrollSpeed[4];
const char *displayEPGPictures[3];
+ const char *windowMode[2];
void Set(void);
public:
cNopacitySetupMenuDisplaySchedules(cNopacityConfig *data);
@@ -74,6 +75,7 @@ class cNopacitySetupMenuDisplayTimers : public cMenuSetupSubMenu {
class cNopacitySetupMenuDisplayRecordings : public cMenuSetupSubMenu {
protected:
const char *displayEPGPictures[3];
+ const char *windowMode[2];
void Set(void);
public:
cNopacitySetupMenuDisplayRecordings(cNopacityConfig *data);
diff --git a/textwindow.c b/textwindow.c
index b9638f6..f0c6d23 100644
--- a/textwindow.c
+++ b/textwindow.c
@@ -3,6 +3,7 @@
cNopacityTextWindow::cNopacityTextWindow(cOsd *osd, cFont *font, cRect *vidWin) {
this->osd = osd;
this->font = font;
+ this->fontHeader = NULL;
this->vidWin = vidWin;
pixmapBackground = NULL;
pixmap = NULL;
@@ -10,6 +11,17 @@ cNopacityTextWindow::cNopacityTextWindow(cOsd *osd, cFont *font, cRect *vidWin)
hasPoster = false;
}
+cNopacityTextWindow::cNopacityTextWindow(cOsd *osd, cFont *font, cFont *fontHeader) {
+ this->osd = osd;
+ this->font = font;
+ this->fontHeader = fontHeader;
+ this->vidWin = NULL;
+ pixmapBackground = NULL;
+ pixmap = NULL;
+ scaledWindow = false;
+ hasPoster = false;
+}
+
cNopacityTextWindow::~cNopacityTextWindow(void) {
Cancel(-1);
while (Active())
@@ -33,7 +45,7 @@ cNopacityTextWindow::~cNopacityTextWindow(void) {
}
}
-void cNopacityTextWindow::SetPoster(const cEvent *event, bool isRecording) {
+void cNopacityTextWindow::SetPoster(const cEvent *event, bool isRecording, bool fullscreen) {
static cPlugin *pTVScraper = cPluginManager::GetPlugin("tvscraper");
if (pTVScraper && event) {
poster.event = event;
@@ -42,8 +54,13 @@ void cNopacityTextWindow::SetPoster(const cEvent *event, bool isRecording) {
hasPoster = true;
int posterWidthOrig = poster.media.width;
int posterHeightOrig = poster.media.height;
- posterHeight = geometry->Height() - 5;
- posterWidth = posterWidthOrig * ((double)posterHeight / (double)posterHeightOrig);
+ if (!fullscreen) {
+ posterHeight = geometry->Height() - 5;
+ posterWidth = posterWidthOrig * ((double)posterHeight / (double)posterHeightOrig);
+ } else {
+ posterWidth = geometry->Width() / 4;
+ posterHeight = posterHeightOrig * ((double)posterWidth / (double)posterWidthOrig);
+ }
} else {
hasPoster = false;
posterHeight = 0;
@@ -126,6 +143,14 @@ void cNopacityTextWindow::CreatePixmap(void) {
cPixmap::Unlock();
}
+void cNopacityTextWindow::CreatePixmapFullScreen(void) {
+ pixmapBackground = osd->CreatePixmap(4, cRect(geometry->X()-1, geometry->Y()-1, geometry->Width()+2, geometry->Height()+2));
+ pixmap = osd->CreatePixmap(5, cRect(geometry->X(), geometry->Y(), geometry->Width(), geometry->Height()));
+ pixmapBackground->Fill(Theme.Color(clrMenuBorder));
+ pixmapBackground->DrawRectangle(cRect(1, 1, geometry->Width(), geometry->Height()), Theme.Color(clrMenuBack));
+ pixmap->Fill(clrTransparent);
+}
+
void cNopacityTextWindow::DrawText(int border, int left) {
int lineHeight = font->Height();
int currentLineHeight = lineHeight/2;
@@ -146,6 +171,158 @@ void cNopacityTextWindow::DrawText(int border, int left) {
cPixmap::Unlock();
}
+void cNopacityTextWindow::SetEvent(const cEvent *event) {
+ if (!event)
+ return;
+ CreatePixmapFullScreen();
+ int border = config.borderDetailedEPG;
+ int width = geometry->Width();
+ int height = geometry->Height();
+ int widthTextHeader = width - 2 * border;
+ int widthText = widthTextHeader;
+ int y = border;
+ cImageLoader imgLoader;
+ bool epgImageFound = false;
+ if (hasPoster) {
+ if (imgLoader.LoadPoster(poster.media.path.c_str(), posterWidth, posterHeight)) {
+ int posterX = width - posterWidth - border;
+ pixmap->DrawImage(cPoint(posterX, border), imgLoader.GetImage());
+ widthTextHeader -= posterWidth;
+ }
+ } else if (imgLoader.LoadEPGImage(event->EventID())) {
+ epgImageFound = true;
+ pixmap->DrawImage(cPoint(width - config.epgImageWidth - border, y), imgLoader.GetImage());
+ widthTextHeader -= config.epgImageWidth;
+ }
+ //Title
+ y = DrawTextWrapper(event->Title(), widthTextHeader, y, border, fontHeader, Theme.Color(clrMenuFontDetailViewHeaderTitle));
+ //Short Text
+ y = DrawTextWrapper(event->ShortText(), widthTextHeader, y, border, font, Theme.Color(clrMenuFontDetailViewHeader));
+
+ y += fontHeader->Height();
+ //Description
+ int maxHeight = height - y;
+ if (hasPoster && (y < (border + posterHeight))) {
+ int heightNarrow = border + posterHeight - y;
+ DrawTextWrapperFloat(event->Description(),
+ widthTextHeader, widthText, y, heightNarrow,
+ border, font, Theme.Color(clrMenuFontDetailViewText), maxHeight);
+ } else if (epgImageFound && (y < (border + config.epgImageHeight))) {
+ y = border + config.epgImageHeight;
+ DrawTextWrapper(event->Description(), widthText, y, border, font, Theme.Color(clrMenuFontDetailViewText), maxHeight);
+ } else {
+ DrawTextWrapper(event->Description(), widthText, y, border, font, Theme.Color(clrMenuFontDetailViewText), maxHeight);
+ }
+}
+
+void cNopacityTextWindow::SetRecording(const cRecording *recording) {
+ if (!recording)
+ return;
+ CreatePixmapFullScreen();
+ int border = config.borderDetailedRecordings;
+ int width = geometry->Width();
+ int height = geometry->Height();
+ int widthTextHeader = width - 2 * border;
+ int widthText = widthTextHeader;
+ int y = border;
+ cImageLoader imgLoader;
+ bool recImageFound = false;
+ if (hasPoster) {
+ if (imgLoader.LoadPoster(poster.media.path.c_str(), posterWidth, posterHeight)) {
+ int posterX = width - posterWidth - border;
+ pixmap->DrawImage(cPoint(posterX, border), imgLoader.GetImage());
+ widthTextHeader -= posterWidth;
+ }
+ } else if (imgLoader.LoadRecordingImage(recording->FileName())) {
+ pixmap->DrawImage(cPoint(width - config.epgImageWidth - border, y), imgLoader.GetImage());
+ widthTextHeader -= config.epgImageWidth;
+ recImageFound = true;
+ }
+ const cRecordingInfo *info = recording->Info();
+ if (!info)
+ return;
+ cString recTitle;
+ if (info->Title())
+ recTitle = info->Title();
+ else
+ recTitle = recording->Name();
+ //Title
+ y = DrawTextWrapper(*recTitle, widthTextHeader, y, border, fontHeader, Theme.Color(clrMenuFontDetailViewHeaderTitle));
+ //Short Text
+ if (!isempty(info->ShortText())) {
+ y = DrawTextWrapper(info->ShortText(), widthTextHeader, y, border, font, Theme.Color(clrMenuFontDetailViewHeader));
+ }
+ y += fontHeader->Height();
+ //Description
+ int maxHeight = height - y;
+ if (hasPoster && (y < (border + posterHeight))) {
+ int heightNarrow = border + posterHeight - y;
+ DrawTextWrapperFloat(recording->Info()->Description(),
+ widthTextHeader, widthText, y, heightNarrow,
+ border, font, Theme.Color(clrMenuFontDetailViewText), maxHeight);
+ } else if (recImageFound && (y < (border + config.epgImageHeight))) {
+ y = border + config.epgImageHeight;
+ DrawTextWrapper(recording->Info()->Description(), widthText, y, border, font, Theme.Color(clrMenuFontDetailViewText), maxHeight);
+ } else {
+ DrawTextWrapper(recording->Info()->Description(), widthText, y, border, font, Theme.Color(clrMenuFontDetailViewText), maxHeight);
+ }
+}
+
+int cNopacityTextWindow::DrawTextWrapper(const char *text, int width, int top, int x,
+ const cFont *font, tColor color, int maxHeight) {
+ cTextWrapper wrapper;
+ wrapper.Set(text, font, width);
+ int height = 2*font->Height();
+ int y = top;
+ for (int i=0; i < wrapper.Lines(); i++) {
+ if (maxHeight && (height > maxHeight)) {
+ pixmap->DrawText(cPoint(x, y), "...", color, clrTransparent, font);
+ break;
+ }
+ pixmap->DrawText(cPoint(x, y), wrapper.GetLine(i), color, clrTransparent, font);
+ y += font->Height();
+ height += font->Height();
+ }
+ return y;
+}
+
+int cNopacityTextWindow::DrawTextWrapperFloat(const char *text, int widthSmall, int widthFull,
+ int top, int heightNarrow, int x, const cFont *font,
+ tColor color, int maxHeight) {
+ int lineHeight = font->Height();
+ int numLinesNarrow = heightNarrow / lineHeight;
+ cTextWrapper wrapperNarrow;
+ wrapperNarrow.Set(text, font, widthSmall);
+ int height = 2*font->Height();
+ int y = top;
+ int numChars = 0;
+ for (int i=0; i < wrapperNarrow.Lines(); i++) {
+ std::string line = wrapperNarrow.GetLine(i);
+ numChars += line.size();
+ pixmap->DrawText(cPoint(x, y), wrapperNarrow.GetLine(i), color, clrTransparent, font);
+ y += lineHeight;
+ height += lineHeight;
+ if (i == numLinesNarrow)
+ break;
+ }
+ std::string textRest = text;
+ if (textRest.size() > numChars) {
+ textRest = textRest.substr(numChars);
+ cTextWrapper wrapper;
+ wrapper.Set(textRest.c_str(), font, widthFull);
+ for (int i=1; i < wrapper.Lines(); i++) {
+ if (maxHeight && (height > maxHeight)) {
+ pixmap->DrawText(cPoint(x, y), "...", color, clrTransparent, font);
+ break;
+ }
+ pixmap->DrawText(cPoint(x, y), wrapper.GetLine(i), color, clrTransparent, font);
+ y += lineHeight;
+ height += lineHeight;
+ }
+ }
+ return y;
+}
+
void cNopacityTextWindow::DrawPoster(int border) {
cImageLoader imgLoader;
if (imgLoader.LoadPoster(poster.media.path.c_str(), posterWidth, posterHeight)) {
diff --git a/textwindow.h b/textwindow.h
index 0fe1a9e..8d3a7b1 100644
--- a/textwindow.h
+++ b/textwindow.h
@@ -4,6 +4,7 @@ class cNopacityTextWindow : public cThread {
private:
cOsd *osd;
cFont *font;
+ cFont *fontHeader;
cPixmap *pixmapBackground;
cPixmap *pixmap;
cRect *geometry;
@@ -21,17 +22,23 @@ private:
int posterWidth, posterHeight;
bool SetTextScroller(int border, int left);
void CreatePixmap(void);
+ void CreatePixmapFullScreen(void);
void DrawText(int border, int left);
void DrawPoster(int border);
+ int DrawTextWrapper(const char *text, int width, int top, int x, const cFont *font, tColor color, int maxHeight = 0);
+ int DrawTextWrapperFloat(const char *text, int widthSmall, int widthFull, int top, int heightNarrow, int x, const cFont *font, tColor color, int maxHeight);
void DoSleep(int duration);
virtual void Action(void);
void ScaleVideoWindow(void);
public:
cNopacityTextWindow(cOsd *osd, cFont *font, cRect *vidWin);
+ cNopacityTextWindow(cOsd *osd, cFont *font, cFont *fontHeader);
virtual ~cNopacityTextWindow(void);
void SetGeometry(cRect *geo) {geometry = geo;};
+ void SetEvent(const cEvent *event);
+ void SetRecording(const cRecording *recording);
void SetText(cString Text) {text = Text;};
- void SetPoster(const cEvent *event, bool isRecording);
+ void SetPoster(const cEvent *event, bool isRecording, bool fullscreen = false);
};
#endif //__NOPACITY_TEXTWINDOW_H \ No newline at end of file
diff --git a/themes/nOpacity-darkred.theme b/themes/nOpacity-darkred.theme
index ff448ff..35de9cb 100644
--- a/themes/nOpacity-darkred.theme
+++ b/themes/nOpacity-darkred.theme
@@ -32,7 +32,7 @@ clrTracksFontHead = FF858585
clrTracksFontButtons = FFCCCCCC
clrVolumeFont = FF858585
clrMenuBack = DD000000
-clrMenuBorder = FF050505
+clrMenuBorder = FF050505
clrMenuScrollBar = DD550000
clrMenuScrollBarBack = dd000000
clrMenuItem = DD333333