diff options
author | louis <louis.braun@gmx.de> | 2013-04-13 10:41:51 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-04-13 10:41:51 +0200 |
commit | 91c004390c528f8abea82f0a867d4e47cd14f996 (patch) | |
tree | cf782015896fb5fd6a9951a4a0a4f8a515ce64b3 | |
parent | 7aad394c1037743817e41429e2eca7bd4319dae6 (diff) | |
download | skin-nopacity-91c004390c528f8abea82f0a867d4e47cd14f996.tar.gz skin-nopacity-91c004390c528f8abea82f0a867d4e47cd14f996.tar.bz2 |
added option auto for video scaling
-rw-r--r-- | HISTORY | 6 | ||||
-rw-r--r-- | README | 3 | ||||
-rw-r--r-- | displaymenu.c | 4 | ||||
-rw-r--r-- | menuitem.c | 12 | ||||
-rw-r--r-- | menuitem.h | 6 | ||||
-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-- | rssreader.c | 4 | ||||
-rw-r--r-- | setup.c | 5 | ||||
-rw-r--r-- | setup.h | 1 | ||||
-rw-r--r-- | textwindow.c | 15 | ||||
-rw-r--r-- | textwindow.h | 4 |
13 files changed, 74 insertions, 19 deletions
@@ -194,3 +194,9 @@ Version 0.1.1 - check for Slash at end of startup path parameters - changed scaling of EPG info window font size - Added and changed some icons + +Version 0.1.2 +- changed some color settings and icons in theme darkred +- added option "auto" for video scaling: with this option the video window + is resized when the detailed EPG Window is displayed in Schedules and + Recordings menu to be completely visible. @@ -187,7 +187,8 @@ Customizing, Skin Setup Options - Adjust Font Size - Default Menu Item - Adjustment of narrow menus: the narrow menus (main, schedules, channels, timers, setup) can either be adjusted left or right. -- Scale Video size to fit into menu window +- Scale Video size to fit into menu window: no / yes / auto: with "auto" the video window is resized when the detailed EPG Window is displayed in Schedules and + Recordings menu to be completely visible. - Header Height (% of OSD Height): Default: 7% - Header Icon Size (Square Header Menu Icons) - Footer Height (% of OSD Height): Default: 7% diff --git a/displaymenu.c b/displaymenu.c index cc3a901..e1b08e1 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -395,7 +395,7 @@ bool cNopacityDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Cur if (!config.narrowScheduleMenu) return false; if ((initMenu)&&(Index > menuItemIndexLast)) { - cNopacityMenuItem *item = new cNopacityScheduleMenuItem(osd, Event, Channel, TimerMatch, Selectable, MenuCategory()); + cNopacityMenuItem *item = new cNopacityScheduleMenuItem(osd, Event, Channel, TimerMatch, Selectable, MenuCategory(), &videoWindowRect); cPoint itemSize; menuView->GetMenuItemSize(MenuCategory(), &itemSize); item->SetFont(menuView->GetMenuItemFont(mcSchedule)); @@ -509,7 +509,7 @@ bool cNopacityDisplayMenu::SetItemRecording(const cRecording *Recording, int Ind bool isFolder = false; if (Total > 0) isFolder = true; - cNopacityMenuItem *item = new cNopacityRecordingMenuItem(osd, Recording, Selectable, isFolder, Level, Total, New); + cNopacityMenuItem *item = new cNopacityRecordingMenuItem(osd, Recording, Selectable, isFolder, Level, Total, New, &videoWindowRect); cPoint itemSize; menuView->GetMenuItemSize(MenuCategory(), &itemSize); item->SetFont(menuView->GetMenuItemFont(mcRecording)); @@ -368,12 +368,13 @@ void cNopacityMainMenuItem::Render() { // cNopacityScheduleMenuItem ------------- -cNopacityScheduleMenuItem::cNopacityScheduleMenuItem(cOsd *osd, const cEvent *Event, const cChannel *Channel, eTimerMatch TimerMatch, bool sel, eMenuCategory category) -: cNopacityMenuItem (osd, "", sel) { +cNopacityScheduleMenuItem::cNopacityScheduleMenuItem(cOsd *osd, const cEvent *Event, const cChannel *Channel, eTimerMatch TimerMatch, bool sel, eMenuCategory category, cRect *vidWin) + : cNopacityMenuItem (osd, "", sel) { this->category = category; this->Event = Event; this->Channel = Channel; this->TimerMatch = TimerMatch; + this->vidWin = vidWin; strDateTime = ""; strTitle = ""; strSubTitle = ""; @@ -487,7 +488,7 @@ void cNopacityScheduleMenuItem::Render() { infoTextWindow = NULL; } if (current && Event) { - infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow); + infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow, vidWin); infoTextWindow->SetGeometry(textWindow); infoTextWindow->SetText(Event->Description()); infoTextWindow->Start(); @@ -807,12 +808,13 @@ void cNopacityTimerMenuItem::DrawLogo(int logoWidth, int logoHeight) { } // cNopacityRecordingMenuItem ------------- -cNopacityRecordingMenuItem::cNopacityRecordingMenuItem(cOsd *osd, const cRecording *Recording, bool sel, bool isFolder, int Level, int Total, int New) : cNopacityMenuItem (osd, "", sel) { +cNopacityRecordingMenuItem::cNopacityRecordingMenuItem(cOsd *osd, const cRecording *Recording, bool sel, bool isFolder, int Level, int Total, int New, cRect *vidWin) : cNopacityMenuItem (osd, "", sel) { this->Recording = Recording; this->isFolder = isFolder; this->Level = Level; this->Total = Total; this->New = New; + this->vidWin = vidWin; } cNopacityRecordingMenuItem::~cNopacityRecordingMenuItem(void) { @@ -1046,7 +1048,7 @@ void cNopacityRecordingMenuItem::Render() { infoTextWindow = NULL; } if (current) { - infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow); + infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow, vidWin); infoTextWindow->SetGeometry(textWindow); infoTextWindow->SetText(Recording->Info()->Description()); infoTextWindow->Start(); @@ -82,6 +82,7 @@ private: const cEvent *Event; const cChannel *Channel; eTimerMatch TimerMatch; + cRect *vidWin; std::string strDateTime; std::string strTitle; std::string strSubTitle; @@ -96,7 +97,7 @@ private: void SetTextFull(void); void SetTextShort(void); public: - cNopacityScheduleMenuItem(cOsd *osd, const cEvent *Event, const cChannel *Channel, eTimerMatch TimerMatch, bool sel, eMenuCategory category); + cNopacityScheduleMenuItem(cOsd *osd, const cEvent *Event, const cChannel *Channel, eTimerMatch TimerMatch, bool sel, eMenuCategory category, cRect *vidWin); ~cNopacityScheduleMenuItem(void); void CreatePixmapTextScroller(int totalWidth); void CreateText(void); @@ -148,6 +149,7 @@ private: const cRecording *Recording; bool isFolder; int Level, Total, New; + cRect *vidWin; std::string strRecName; std::string strRecNameFull; void SetTextFull(void); @@ -164,7 +166,7 @@ private: int CheckScrollableRecording(void); int CheckScrollableFolder(void); public: - cNopacityRecordingMenuItem(cOsd *osd, const cRecording *Recording, bool sel, bool isFolder, int Level, int Total, int New); + cNopacityRecordingMenuItem(cOsd *osd, const cRecording *Recording, bool sel, bool isFolder, int Level, int Total, int New, cRect *vidWin); ~cNopacityRecordingMenuItem(void); void CreatePixmapTextScroller(int totalWidth); void CreateText(void); diff --git a/po/de_DE.po b/po/de_DE.po index 2c6f3f0..b8b387c 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-08 18:48+0200\n" +"POT-Creation-Date: 2013-04-13 10:26+0200\n" "PO-Revision-Date: 2012-11-11 17:49+0200\n" "Last-Translator: louis\n" "Language-Team: \n" @@ -113,6 +113,15 @@ msgstr "mittel" msgid "fast" msgstr "schnell" +msgid "no" +msgstr "nein" + +msgid "yes" +msgstr "ja" + +msgid "auto" +msgstr "auto" + msgid "Number of Default Menu Entries per Page" msgstr "Anzahl der Default-MenĂźelemente pro Seite" diff --git a/po/it_IT.po b/po/it_IT.po index 89fd7cd..190e958 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-08 18:48+0200\n" +"POT-Creation-Date: 2013-04-13 10: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" @@ -116,6 +116,15 @@ msgstr "medio" msgid "fast" msgstr "veloce" +msgid "no" +msgstr "" + +msgid "yes" +msgstr "" + +msgid "auto" +msgstr "" + msgid "Number of Default Menu Entries per Page" msgstr "Numero di voci per pagina menu predefinito" diff --git a/po/sk_SK.po b/po/sk_SK.po index d5d4912..c9152a0 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-08 18:48+0200\n" +"POT-Creation-Date: 2013-04-13 10: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" @@ -116,6 +116,15 @@ msgstr "stredne" msgid "fast" msgstr "rýchlo" +msgid "no" +msgstr "" + +msgid "yes" +msgstr "" + +msgid "auto" +msgstr "" + msgid "Number of Default Menu Entries per Page" msgstr "Počet položiek základného menu na stránke" diff --git a/rssreader.c b/rssreader.c index ae9eef1..f0ab032 100644 --- a/rssreader.c +++ b/rssreader.c @@ -170,7 +170,7 @@ void cRssReader::DoSleep(int duration) { } void cRssReader::Action(void) { -esyslog("nopacity: feed %s", feedUrl.c_str()); + int success = readRssURL(feedUrl.c_str()); if (success < 1) return; @@ -182,7 +182,7 @@ esyslog("nopacity: feed %s", feedUrl.c_str()); return; } saveRss(); -//debugRSS(); + //debugRSS(); int numElements = rssElements.size(); int scrollDelay = config.rssScrollDelay * 1000; int drawPortX; @@ -245,6 +245,9 @@ cNopacitySetupMenuDisplay::cNopacitySetupMenuDisplay(cNopacityConfig* data) : c scrollSpeed[1] = tr("slow"); scrollSpeed[2] = tr("medium"); scrollSpeed[3] = tr("fast"); + scalePic[0] = tr("no"); + scalePic[1] = tr("yes"); + scalePic[2] = tr("auto"); Set(); } @@ -254,7 +257,7 @@ void cNopacitySetupMenuDisplay::Set(void) { Add(new cMenuEditIntItem(tr("Number of Default Menu Entries per Page"), &tmpNopacityConfig->numDefaultMenuItems, 10, 40)); Add(new cMenuEditIntItem(tr("Adjust Font Size - Default Menu Item"), &tmpNopacityConfig->fontMenuitemDefault, -20, 20)); Add(new cMenuEditStraItem(tr("Adjustment of narrow menus"), &tmpNopacityConfig->menuAdjustLeft, 2, adjustLeft)); - Add(new cMenuEditBoolItem(tr("Scale Video size to fit into menu window"), &tmpNopacityConfig->scalePicture)); + Add(new cMenuEditStraItem(tr("Scale Video size to fit into menu window"), &tmpNopacityConfig->scalePicture, 3, scalePic)); Add(new cMenuEditIntItem(tr("Header Height (Percent of OSD Height)"), &tmpNopacityConfig->headerHeight, 5, 30)); Add(new cMenuEditIntItem(tr("Header Icon Size (Square Header Menu Icons)"), &tmpNopacityConfig->headerIconHeight, 30, 200)); Add(new cMenuEditIntItem(tr("Footer Height (Percent of OSD Height)"), &tmpNopacityConfig->footerHeight, 5, 30)); @@ -31,6 +31,7 @@ class cNopacitySetupMenuDisplay : public cMenuSetupSubMenu { protected: const char *adjustLeft[2]; const char *scrollSpeed[4]; + const char *scalePic[3]; void Set(void); public: cNopacitySetupMenuDisplay(cNopacityConfig *data); diff --git a/textwindow.c b/textwindow.c index 26e4134..c999a52 100644 --- a/textwindow.c +++ b/textwindow.c @@ -1,10 +1,12 @@ #include "textwindow.h" -cNopacityTextWindow::cNopacityTextWindow(cOsd *osd, cFont *font) { +cNopacityTextWindow::cNopacityTextWindow(cOsd *osd, cFont *font, cRect *vidWin) { this->osd = osd; this->font = font; + this->vidWin = vidWin; pixmapBackground = NULL; pixmap = NULL; + oldVidWinHeight = 0; } cNopacityTextWindow::~cNopacityTextWindow(void) { @@ -19,6 +21,8 @@ cNopacityTextWindow::~cNopacityTextWindow(void) { osd->DestroyPixmap(pixmap); pixmap = NULL; } + if (config.scalePicture == 2) + vidWin->SetHeight(oldVidWinHeight); } bool cNopacityTextWindow::CreatePixmap(int border) { @@ -63,7 +67,14 @@ void cNopacityTextWindow::DoSleep(int duration) { void cNopacityTextWindow::Action(void) { DoSleep(config.menuInfoTextDelay*1000); - + + if (config.scalePicture == 2) { + oldVidWinHeight = vidWin->Height(); + cRect availableRect(vidWin->X(), vidWin->Y(), vidWin->Width(), vidWin->Height() - geometry->Height()); + cRect vidWinNew = cDevice::PrimaryDevice()->CanScaleVideo(availableRect); + vidWin->SetHeight(vidWinNew.Height()); + } + int border = 5; bool scrolling = false; if (Running()) { diff --git a/textwindow.h b/textwindow.h index c9bd469..ad9d7f5 100644 --- a/textwindow.h +++ b/textwindow.h @@ -7,6 +7,8 @@ private: cPixmap *pixmapBackground; cPixmap *pixmap; cRect *geometry; + cRect *vidWin; + int oldVidWinHeight; const char *text; cTextWrapper twText; bool CreatePixmap(int border); @@ -14,7 +16,7 @@ private: void DoSleep(int duration); virtual void Action(void); public: - cNopacityTextWindow(cOsd *osd, cFont *font); + cNopacityTextWindow(cOsd *osd, cFont *font, cRect *vidWin); virtual ~cNopacityTextWindow(void); void SetGeometry(cRect *geo) {geometry = geo;}; void SetText(const char *Text) {text = Text;}; |