From db8c047fc6af3c87ebd7284d8e90a5cd90602c4f Mon Sep 17 00:00:00 2001 From: Martin Schirrmacher Date: Sun, 9 Feb 2014 16:57:17 +0100 Subject: fix menu item-progressbar overlay item-text --- displaymenu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'displaymenu.c') diff --git a/displaymenu.c b/displaymenu.c index 8b0bb392..e6cf48d6 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -297,6 +297,9 @@ void cFlatDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool S bool isRunning = false; int xt = Tab(i); + int xt2 = Tab(i+1); + if( xt2 == 0 ) + xt2 = menuItemWidth; if( xt >= menuItemWidth ) continue; @@ -389,7 +392,6 @@ void cFlatDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool S xt + Config.decorBorderMenuItemSize, colWidth, s, ColorFg, ColorBarFg, ColorBg); } else { if( (menuCategory == mcMain || menuCategory == mcSetup) && Config.MenuItemIconsShow) { - cString cIcon = GetIconName( MainMenuText(s) ); cImageLoader imgLoader; if (imgLoader.LoadIcon(*cIcon, fontHeight -marginItem*2)) { @@ -402,8 +404,7 @@ void cFlatDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool S menuPixmap->DrawText(cPoint(fontHeight + marginItem*2 + xt + Config.decorBorderMenuItemSize, y), s, ColorFg, ColorBg, font, AvailableTextWidth - xt - marginItem*2 - fontHeight); } else { - menuPixmap->DrawText(cPoint(xt + Config.decorBorderMenuItemSize, y), s, ColorFg, ColorBg, font, - AvailableTextWidth - xt); + menuPixmap->DrawText(cPoint(xt + Config.decorBorderMenuItemSize, y), s, ColorFg, ColorBg, font, xt2 - xt); } } } -- cgit v1.2.3