- 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
This commit is contained in:
striper
2011-10-07 15:01:04 +00:00
parent 3b6eccb0bf
commit 8041efac14

View File

@@ -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;
}