diff options
-rw-r--r-- | displaymenu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/displaymenu.c b/displaymenu.c index e31c83dd..0f62bac5 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -16,7 +16,7 @@ cFlatDisplayMenu::cFlatDisplayMenu(void) { buttonsHeight + Config.decorBorderButtonSize*2 + marginItem*3 ); scrollBarTop = topBarHeight + marginItem + Config.decorBorderTopBarSize*2; - menuWidth = osdWidth - scrollBarWidth; + menuWidth = osdWidth; // - scrollBarWidth; // scrollbar only if needed menuTop = topBarHeight + marginItem + Config.decorBorderTopBarSize*2 + Config.decorBorderMenuItemSize; menuPixmap = osd->CreatePixmap(1, cRect(0, menuTop, menuWidth, scrollBarHeight )); @@ -54,6 +54,9 @@ void cFlatDisplayMenu::SetMenuCategory(eMenuCategory MenuCategory) { } void cFlatDisplayMenu::DrawScrollbar(int Total, int Offset, int Shown, int Top, int Height, bool CanScrollUp, bool CanScrollDown) { + if (Total > 0 && Total > Shown) + menuPixmap->DrawRectangle(cRect(menuWidth - scrollBarWidth, 0, scrollBarWidth, scrollBarHeight), clrTransparent); + ScrollbarDraw(scrollbarPixmap, Config.MenuItemPadding, Top, Height, Total, Offset, Shown, CanScrollUp, CanScrollDown); } |