summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY3
-rw-r--r--config.c3
-rw-r--r--config.h1
-rw-r--r--displaymenu.c32
-rw-r--r--displaymenu.h2
-rw-r--r--po/de_DE.po5
-rw-r--r--setup.c4
7 files changed, 48 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index 5297586d..11d71e0c 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,6 +1,9 @@
VDR Plugin 'skinflatplus' Revision History
---------------------------------------
+2014-09-XX: Version 0.4.3
+- [add] option to draw the menu background over the entire height
+
2014-08-10: Version 0.4.2
- [update] change direcotry of config-files
diff --git a/config.c b/config.c
index 902e517c..68aac22e 100644
--- a/config.c
+++ b/config.c
@@ -59,6 +59,8 @@ cFlatConfig::cFlatConfig(void) {
MenuEventView = 1;
MenuRecordingView = 1;
+ MenuFullOsd = 0;
+
MenuItemRecordingClearPercent = 1;
MenuItemRecordingShowFolderDate = 1;
MenuItemParseTilde = 1;
@@ -261,6 +263,7 @@ bool cFlatConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "ChannelBitrateShowCalcInterval") == 0) ChannelBitrateShowCalcInterval = atoi(Value);
else if (strcmp(Name, "TopBarHideClockText") == 0) TopBarHideClockText = atoi(Value);
else if (strcmp(Name, "ChannelTimeLeft") == 0) ChannelTimeLeft = atoi(Value);
+ else if (strcmp(Name, "MenuFullOsd") == 0) MenuFullOsd = atoi(Value);
else return false;
diff --git a/config.h b/config.h
index 1b26555d..9732214c 100644
--- a/config.h
+++ b/config.h
@@ -221,6 +221,7 @@ class cFlatConfig
int MenuTimerView;
int MenuEventView;
int MenuRecordingView;
+ int MenuFullOsd;
// 0 = vertikal
// 1 = horizontal
diff --git a/displaymenu.c b/displaymenu.c
index 318e1c6b..9f649dbe 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -44,6 +44,9 @@ cFlatDisplayMenu::cFlatDisplayMenu(void) {
ItemEventLastChannelName = "";
+ menuItemLastHeight = 0;
+ MenuFullOsdIsDrawn = false;
+
menuWidth = osdWidth;
menuTop = topBarHeight + marginItem + Config.decorBorderTopBarSize*2 + Config.decorBorderMenuItemSize;
menuPixmap = osd->CreatePixmap(1, cRect(0, menuTop, menuWidth, scrollBarHeight ));
@@ -113,7 +116,6 @@ void cFlatDisplayMenu::SetMenuCategory(eMenuCategory MenuCategory) {
else if( Config.MenuRecordingView == 2 || Config.MenuRecordingView == 3 )
itemRecordingHeight = fontHeight + fontSmlHeight + marginItem + Config.MenuItemPadding + Config.decorBorderMenuItemSize*2;
}
-
}
void cFlatDisplayMenu::SetScrollbar(int Total, int Offset) {
@@ -198,6 +200,9 @@ void cFlatDisplayMenu::Clear(void) {
DecorBorderClearAll();
isScrolling = false;
+ menuItemLastHeight = 0;
+ MenuFullOsdIsDrawn = false;
+
ComplexContent.Clear();
ShowRecording = ShowEvent = ShowText = false;
}
@@ -312,6 +317,10 @@ void cFlatDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool S
iconNew = imgLoader.LoadIcon("text_new", fontHeight, fontHeight);
}
}
+
+ if( y + itemHeight > menuItemLastHeight )
+ menuItemLastHeight = y + itemHeight;
+
menuPixmap->DrawRectangle(cRect(Config.decorBorderMenuItemSize, y, menuItemWidth, fontHeight), ColorBg);
int lh = fontHeight;
int xOff = 0;
@@ -663,6 +672,9 @@ bool cFlatDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool C
}
}
+ if( y + itemChannelHeight > menuItemLastHeight )
+ menuItemLastHeight = y + itemChannelHeight;
+
menuPixmap->DrawRectangle(cRect(Config.decorBorderMenuItemSize, y, menuItemWidth, Height), ColorBg);
int Left, Top, Width;
@@ -1080,6 +1092,9 @@ bool cFlatDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current
}
}
+ if( y + itemTimerHeight > menuItemLastHeight )
+ menuItemLastHeight = y + itemTimerHeight;
+
menuPixmap->DrawRectangle(cRect(Config.decorBorderMenuItemSize, y, menuItemWidth, Height), ColorBg);
cImage *img = NULL;
int Left, Top;
@@ -1337,6 +1352,9 @@ bool cFlatDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current
}
}
+ if( y + itemEventHeight > menuItemLastHeight )
+ menuItemLastHeight = y + itemEventHeight;
+
menuPixmap->DrawRectangle(cRect(Config.decorBorderMenuItemSize, y, menuItemWidth, Height), ColorBg);
int Left = 0, Top = 0, LeftSecond = 0;
@@ -1725,6 +1743,9 @@ bool cFlatDisplayMenu::SetItemRecording(const cRecording *Recording, int Index,
}
}
+ if( y + itemRecordingHeight > menuItemLastHeight )
+ menuItemLastHeight = y + itemRecordingHeight;
+
menuPixmap->DrawRectangle(cRect(Config.decorBorderMenuItemSize, y, menuItemWidth, Height), ColorBg);
cImage *img = NULL;
cImage *imgRecNew = NULL;
@@ -3299,6 +3320,15 @@ const cFont *cFlatDisplayMenu::GetTextAreaFont(bool FixedFont) const {
void cFlatDisplayMenu::Flush(void) {
TopBarUpdate();
+
+ if( Config.MenuFullOsd && !MenuFullOsdIsDrawn ) {
+ dsyslog("menuItemLastHeight: %d ItemsHeight() - menuItemLastHeight: %d", menuItemLastHeight, ItemsHeight() - menuItemLastHeight );
+ menuPixmap->DrawRectangle(cRect(0, menuItemLastHeight - Config.decorBorderMenuItemSize, menuItemWidth + Config.decorBorderMenuItemSize*2, menuPixmap->ViewPort().Height() - menuItemLastHeight + marginItem), Theme.Color(clrItemSelableBg));
+ //menuPixmap->DrawRectangle(cRect(0, menuPixmap->ViewPort().Height() - 5, menuItemWidth + Config.decorBorderMenuItemSize*2, 5), Theme.Color(clrItemSelableBg));
+ MenuFullOsdIsDrawn = true;
+ }
+
+
osd->Flush();
}
diff --git a/displaymenu.h b/displaymenu.h
index aa3a4b31..51b073ce 100644
--- a/displaymenu.h
+++ b/displaymenu.h
@@ -17,6 +17,8 @@ class cFlatDisplayMenu : public cFlatBaseRender, public cSkinDisplayMenu {
int menuTop, menuWidth;
int menuItemWidth;
+ int menuItemLastHeight;
+ bool MenuFullOsdIsDrawn;
eMenuCategory menuCategory;
int VideoDiskUsageState;
diff --git a/po/de_DE.po b/po/de_DE.po
index 89ad8144..79cd39c6 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-skinflat 0.4.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2014-08-10 11:31+0200\n"
+"POT-Creation-Date: 2014-09-26 15:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -480,6 +480,9 @@ msgstr "Zeige Wiederholungen bei EPG"
msgid "Main menuitem scale"
msgstr "Hauptmenüeintrag Scale"
+msgid "Menu draw background over the entire height"
+msgstr "Menü zeichne Hintergrund über gesamte Höhe"
+
msgid "Menu channel view"
msgstr "Menü Kanal Ansicht"
diff --git a/setup.c b/setup.c
index da71b5f6..ceb5d106 100644
--- a/setup.c
+++ b/setup.c
@@ -269,6 +269,7 @@ void cFlatSetup::Store(void) {
SetupStore("ChannelBitrateShowCalcInterval", Config.ChannelBitrateShowCalcInterval);
SetupStore("TopBarHideClockText", Config.TopBarHideClockText);
SetupStore("ChannelTimeLeft", Config.ChannelTimeLeft);
+ SetupStore("MenuFullOsd", Config.MenuFullOsd);
Config.Init();
}
@@ -411,6 +412,7 @@ bool cFlatSetupGeneral::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "ChannelBitrateShowCalcInterval") == 0) SetupConfig->ChannelBitrateShowCalcInterval = atoi(Value);
else if (strcmp(Name, "TopBarHideClockText") == 0) SetupConfig->TopBarHideClockText = atoi(Value);
else if (strcmp(Name, "ChannelTimeLeft") == 0) SetupConfig->ChannelTimeLeft = atoi(Value);
+ else if (strcmp(Name, "MenuFullOsd") == 0) SetupConfig->MenuFullOsd = atoi(Value);
else return false;
return true;
@@ -534,6 +536,7 @@ void cFlatSetupGeneral::SaveCurrentSettings(void) {
Config.Store("ChannelBitrateShowCalcInterval", SetupConfig->ChannelBitrateShowCalcInterval, *Filename);
Config.Store("TopBarHideClockText", SetupConfig->TopBarHideClockText, *Filename);
Config.Store("ChannelTimeLeft", SetupConfig->ChannelTimeLeft, *Filename);
+ Config.Store("MenuFullOsd", SetupConfig->MenuFullOsd, *Filename);
cString msg = cString::sprintf("%s %s", tr("saved settings in file:"), *File);
Skins.Message(mtInfo, msg);
@@ -803,6 +806,7 @@ void cFlatSetupMenu::Setup(void) {
Add(new cMenuEditBoolItem(tr("Show additional EPG info"), &SetupConfig->EpgAdditionalInfoShow));
Add(new cMenuEditBoolItem(tr("Show reruns in EPG info"), &SetupConfig->EpgRerunsShow));
Add(new cMenuEditPrcItem(tr("Main menuitem scale"), &SetupConfig->MainMenuItemScale, 0.2, 1, 0));
+ Add(new cMenuEditBoolItem(tr("Menu draw background over the entire height"), &SetupConfig->MenuFullOsd));
Add(new cMenuEditStraItem(tr("Menu channel view"), &SetupConfig->MenuChannelView, MenuChannelViews.Size(), &MenuChannelViews[0]));
Add(new cMenuEditStraItem(tr("Menu timer view"), &SetupConfig->MenuTimerView, MenuTimerViews.Size(), &MenuTimerViews[0]));