diff options
Diffstat (limited to 'displaymenu.c')
-rw-r--r-- | displaymenu.c | 32 |
1 files changed, 31 insertions, 1 deletions
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(); } |