mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 01:41:23 +02:00
Merge branch 'master' into pu/mp
This commit is contained in:
@@ -37,13 +37,13 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
CBuildInfo::CBuildInfo(bool show) : CComponentsWindow(0, 0, CCW_PERCENT 90, CCW_PERCENT 90, LOCALE_BUILDINFO_MENU, NEUTRINO_ICON_INFO)
|
||||
CBuildInfo::CBuildInfo(bool show) : CComponentsWindow(0, 0, CCW_PERCENT 85, CCW_PERCENT 85, LOCALE_BUILDINFO_MENU, NEUTRINO_ICON_INFO)
|
||||
{
|
||||
initVarBuildInfo();
|
||||
if (show)
|
||||
exec(NULL, "");
|
||||
else
|
||||
InitInfoItems();
|
||||
GetData();
|
||||
}
|
||||
|
||||
//init all var members
|
||||
@@ -54,7 +54,6 @@ void CBuildInfo::initVarBuildInfo()
|
||||
font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_HINT];
|
||||
setWindowHeaderButtons(CComponentsHeader::CC_BTN_MENU | CComponentsHeader::CC_BTN_EXIT);
|
||||
|
||||
|
||||
shadow = CC_SHADOW_ON;
|
||||
}
|
||||
|
||||
@@ -66,13 +65,13 @@ int CBuildInfo::exec(CMenuTarget* parent, const string & /*actionKey*/)
|
||||
if (parent)
|
||||
parent->hide();
|
||||
|
||||
InitInfoItems();
|
||||
|
||||
//exit if no informations available
|
||||
if (!HasData()){
|
||||
if (!GetData()){
|
||||
return res;
|
||||
}
|
||||
|
||||
InitInfoItems();
|
||||
|
||||
//paint window
|
||||
if (!is_painted)
|
||||
paint();
|
||||
@@ -119,7 +118,7 @@ void CBuildInfo::setFontType(Font* font_text)
|
||||
InitInfoItems();
|
||||
}
|
||||
|
||||
bool CBuildInfo::HasData()
|
||||
bool CBuildInfo::GetData()
|
||||
{
|
||||
v_info.clear();
|
||||
|
||||
@@ -168,20 +167,20 @@ bool CBuildInfo::HasData()
|
||||
void CBuildInfo::InitInfoItems()
|
||||
{
|
||||
//get and checkup required informations
|
||||
if (!HasData())
|
||||
if (!GetData())
|
||||
return;
|
||||
|
||||
//ensure a clean body
|
||||
ccw_body->clear();
|
||||
|
||||
//define size and position
|
||||
int x_info = 10;
|
||||
int x_info = OFFSET_INNER_MID;
|
||||
int h_info = ccw_body->getHeight()/v_info.size(); //default height
|
||||
int w_info = width-2*x_info;
|
||||
|
||||
//init info texts
|
||||
for(size_t i=0; i<v_info.size(); i++){
|
||||
CComponentsExtTextForm *info = new CComponentsExtTextForm(10, CC_APPEND, w_info, h_info, g_Locale->getText(v_info[i].caption), v_info[i].info_text, NULL, ccw_body);
|
||||
CComponentsExtTextForm *info = new CComponentsExtTextForm(OFFSET_INNER_MID, CC_APPEND, w_info, h_info, g_Locale->getText(v_info[i].caption), v_info[i].info_text, NULL, ccw_body);
|
||||
info->setLabelAndTextFont(font);
|
||||
info->setTextModes(CTextBox::TOP , CTextBox::AUTO_HIGH | CTextBox::TOP | CTextBox::AUTO_LINEBREAK_NO_BREAKCHARS);
|
||||
info->doPaintBg(false);
|
||||
|
Reference in New Issue
Block a user