gui/widget/menue.cpp: fix CMenuForwarderNonLocalized::getWidth

Origin commit data
------------------
Branch: ni/coolstream
Commit: f21b291fcd
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-03-29 (Fri, 29 Mar 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2013-03-29 17:12:23 +04:00
parent eff601f92d
commit 785bca0d55
2 changed files with 11 additions and 2 deletions

View File

@@ -1846,6 +1846,15 @@ void CMenuForwarderNonLocalized::setText(const char * const Text)
int CMenuForwarderNonLocalized::getWidth(void)
{
int tw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(the_text, true);
const char * option_text = NULL;
if (option)
option_text = option;
else if (option_string)
option_text = option_string->c_str();
if (option_text != NULL)
tw += 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(option_text, true);
return tw;
}
//-------------------------------------------------------------------------------------------------------------------------------