mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
CComponentsInfoBox: create instance of CComponentsInfoBox in constructor
This commit is contained in:
@@ -325,7 +325,7 @@ void CMenuWidget::Init(const std::string & Icon, const int mwidth, const mn_widg
|
|||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
iconfile = Icon;
|
iconfile = Icon;
|
||||||
details_line = NULL;
|
details_line = NULL;
|
||||||
info_box = NULL;
|
info_box = new CComponentsInfoBox();
|
||||||
|
|
||||||
//handle select values
|
//handle select values
|
||||||
if(w_index > MN_WIDGET_ID_MAX){
|
if(w_index > MN_WIDGET_ID_MAX){
|
||||||
@@ -1159,20 +1159,14 @@ void CMenuWidget::paintHint(int pos)
|
|||||||
|
|
||||||
//init infobox
|
//init infobox
|
||||||
std::string str = g_Locale->getText(item->hint);
|
std::string str = g_Locale->getText(item->hint);
|
||||||
info_box->removeLineBreaks(str);
|
if (info_box){
|
||||||
if (info_box == NULL)
|
info_box->setDimensionsAll(x, ypos2, iwidth, hint_height);
|
||||||
info_box = new CComponentsInfoBox(x, ypos2, iwidth, hint_height, str.c_str(), CTextBox::AUTO_WIDTH, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_HINT]);
|
info_box->removeLineBreaks(str);
|
||||||
else{
|
|
||||||
info_box->setXPos(x);
|
|
||||||
info_box->setYPos(ypos2);
|
|
||||||
info_box->setWidth(iwidth);
|
|
||||||
info_box->setText(str, CTextBox::AUTO_WIDTH, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_HINT]);
|
info_box->setText(str, CTextBox::AUTO_WIDTH, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_HINT]);
|
||||||
|
info_box->setCornerRadius(RADIUS_LARGE);
|
||||||
}
|
info_box->syncSysColors();
|
||||||
info_box->setCornerRadius(RADIUS_LARGE);
|
info_box->setShadowOnOff(CC_SHADOW_ON);
|
||||||
info_box->syncSysColors();
|
info_box->setPicture(item->hintIcon);
|
||||||
info_box->setShadowOnOff(CC_SHADOW_ON);
|
|
||||||
info_box->setPicture(item->hintIcon);
|
|
||||||
#if 0
|
#if 0
|
||||||
/* force full paint - menu-over i.e. option chooser with pulldown can overwrite */
|
/* force full paint - menu-over i.e. option chooser with pulldown can overwrite */
|
||||||
info_box->paint(savescreen, true);
|
info_box->paint(savescreen, true);
|
||||||
|
Reference in New Issue
Block a user