From 8041efac14ed3830a314b515ecd2b1fbddc2be02 Mon Sep 17 00:00:00 2001 From: striper Date: Fri, 7 Oct 2011 15:01:04 +0000 Subject: [PATCH] - menue.cpp: CMenuWidget::paint() - consider icon width git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1752 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/widget/menue.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index f42b5e3e6..d58d367d2 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -745,8 +745,17 @@ void CMenuWidget::paint() height = wanted_height; width = min_width; + int wi, hi; for (unsigned int i= 0; i< items.size(); i++) { - int tmpw = items[i]->getWidth() + 10 + 10; /* 10 pixels to the left and right of the text */ + wi = 0; + if (!items[i]->iconName_Info_right.empty()) { + frameBuffer->getIconSize(items[i]->iconName_Info_right.c_str(), &wi, &hi); + if ((wi > 0) && (hi > 0)) + wi += 10; + else + wi = 0; + } + int tmpw = items[i]->getWidth() + 10 + 10 + wi; /* 10 pixels to the left and right of the text */ if (tmpw > width) width = tmpw; }