From 02101b120500214bd3b52c6b2a5c64dafc1ad363 Mon Sep 17 00:00:00 2001 From: satbaby Date: Sat, 7 Aug 2010 11:55:20 +0000 Subject: [PATCH] -fix head icons offset git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@709 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/widget/menue.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 256811422..c89c619c7 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -521,6 +521,7 @@ void CMenuWidget::paint() iconOffset = w; } } + iconOffset += 10; width += iconOffset; if (width > (int)frameBuffer->getScreenWidth()) @@ -564,7 +565,13 @@ void CMenuWidget::paint() frameBuffer->paintBoxRel(x+SHADOW_OFFSET, y+SHADOW_OFFSET, width+sb_width, height, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE); //FIXME rounded frameBuffer->paintBoxRel(x, y, width+sb_width, hheight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP); //FIXME rounded - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+(fw/3)+iconOffset,y+hheight+1, width-((fw/3)+iconOffset), l_name, COL_MENUHEAD, 0, true); // UTF-8 + int HeadiconOffset = 0; + if(!(iconfile.empty())){ + int w, h; + frameBuffer->getIconSize(iconfile.c_str(), &w, &h); + HeadiconOffset = w; + } + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+(fw/3)+HeadiconOffset,y+hheight+1, width-((fw/3)+HeadiconOffset), l_name, COL_MENUHEAD, 0, true); // UTF-8 frameBuffer->paintIcon(iconfile, x + fw/4, y, hheight); item_start_y = y+hheight;