Merge branch 'ni/tuxbox' into ni/mp/tuxbox

Origin commit data
------------------
Commit: 2a787fe28b
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-09-25 (Mon, 25 Sep 2017)
This commit is contained in:
vanhofen
2017-09-25 08:45:42 +02:00
5 changed files with 16 additions and 12 deletions

View File

@@ -53,12 +53,14 @@ void CComponentsDetailsLine::initVarDline( const int& x_pos, const int& y_pos_to
col_shadow = color_shadow;
col_body = color_line;
shadow_w = 1;
//CComponentsDetailsLine
y_down = y_pos_down;
h_mark_top = h_mark_top_;
h_mark_down = h_mark_down_;
shadow_w = 1;
// reduce two times the shadow width, to avoid shadow overlaps
h_mark_top = h_mark_top_ - 2*shadow_w;
h_mark_down = h_mark_down_ - 2*shadow_w;
//CComponentsDetailsLine
dl_w = CFrameBuffer::getInstance()->scale2Res(2); //NI
@@ -99,9 +101,6 @@ void CComponentsDetailsLine::paint(bool do_save_bg)
int sw = shadow_w;
// reduce two times the shadow width, to avoid shadow overlaps
h_mark_down -= 2*sw;
int y_mark_top = y-h_mark_top/2;
int y_mark_down = y_down-h_mark_down/2;
int dx_c = dl_w%2; //correction for odd values

View File

@@ -67,9 +67,9 @@ class CComponentsDetailsLine : public CComponents
///set property: lowest y position
void setYPosDown(const int& y_pos_down){y_down = y_pos_down;};
///set property: height of top marker
void setHMarkTop(const int& h_mark_top_){h_mark_top = h_mark_top_;};
void setHMarkTop(const int& h_mark_top_){h_mark_top = h_mark_top_ - 2*shadow_w;};
///property: height of bottom marker
void setHMarkDown(const int& h_mark_down_){h_mark_down = h_mark_down_;};
void setHMarkDown(const int& h_mark_down_){h_mark_down = h_mark_down_ - 2*shadow_w;};
///set all positions and dimensions of details line at once
void setDimensionsAll(const int& x_pos,const int& y_pos, const int& y_pos_down, const int& h_mark_top_ , const int& h_mark_down_)
{setXPos(x_pos); setYPos(y_pos); setYPosDown(y_pos_down); setHMarkTop(h_mark_top_); setHMarkDown(h_mark_down_);}

View File

@@ -1110,6 +1110,8 @@ void COsdSetup::showOsdTimeoutSetup(CMenuWidget* menu_timeout)
{
CMenuOptionNumberChooser *ch = new CMenuOptionNumberChooser(timing_setting[i].name, &g_settings.timing[i], true, 0, 240);
ch->setNumberFormat(nf);
ch->setLocalizedValue(0);
ch->setLocalizedValueName(LOCALE_OPTIONS_OFF);
ch->setHint("", timing_setting[i].hint);
menu_timeout->addItem(ch);
}

View File

@@ -1172,11 +1172,11 @@ void CMenuWidget::calcSize()
hint_height = 0;
if(g_settings.show_menu_hints && has_hints) {
int lines = 2;
int text_height = 2*OFFSET_INNER_MID + lines*g_Font[SNeutrinoSettings::FONT_TYPE_MENU_HINT]->getHeight();
int text_height = 2*OFFSET_INNER_SMALL + lines*g_Font[SNeutrinoSettings::FONT_TYPE_MENU_HINT]->getHeight();
/* assuming all hint icons has the same size ! */
int icon_width, icon_height;
frameBuffer->getIconSize(NEUTRINO_ICON_HINT_TVMODE, &icon_width, &icon_height);
icon_height += 2*OFFSET_INNER_MID;
icon_height += 2*OFFSET_INNER_SMALL;
hint_height = std::max(icon_height, text_height);
}
/* set the max height to 9/10 of usable screen height
@@ -1234,11 +1234,12 @@ void CMenuWidget::calcSize()
// shrink menu if less items
height = std::min(height, hheight + maxItemHeight);
/*
Always add a bottom offset.
Always add a bottom separator offset.
Most menus has an upper offset too,
which is added with the intro-items
*/
height += OFFSET_INNER_MID;
CMenuItem *separator = new CMenuSeparator();
height += separator->getHeight();
//scrollbar width
scrollbar_width=0;

View File

@@ -364,6 +364,8 @@ private:
void setNumberFormat(std::string format) { numberFormat = format; }
void setNumberFormat(std::string (*fun)(int)) { numberFormatFunction = fun; }
void setNumericInput(bool _numeric_input) { numeric_input = _numeric_input; }
void setLocalizedValue(int special_value) { localized_value = special_value; }
void setLocalizedValueName(neutrino_locale_t special_value_name) { localized_value_name = special_value_name; }
};
class CMenuOptionChooserOptions