mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
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
Origin commit data
------------------
Branch: ni/coolstream
Commit: 8041efac14
Author: gixxpunk <thomas.harfmann@gmail.com>
Date: 2011-10-07 (Fri, 07 Oct 2011)
Origin message was:
------------------
- 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 was generated by Migit
This commit is contained in:
@@ -745,8 +745,17 @@ void CMenuWidget::paint()
|
|||||||
height = wanted_height;
|
height = wanted_height;
|
||||||
width = min_width;
|
width = min_width;
|
||||||
|
|
||||||
|
int wi, hi;
|
||||||
for (unsigned int i= 0; i< items.size(); i++) {
|
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)
|
if (tmpw > width)
|
||||||
width = tmpw;
|
width = tmpw;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user