mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-06 21:28:26 +02:00
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:
@@ -53,12 +53,14 @@ void CComponentsDetailsLine::initVarDline( const int& x_pos, const int& y_pos_to
|
|||||||
col_shadow = color_shadow;
|
col_shadow = color_shadow;
|
||||||
col_body = color_line;
|
col_body = color_line;
|
||||||
|
|
||||||
|
shadow_w = 1;
|
||||||
|
|
||||||
//CComponentsDetailsLine
|
//CComponentsDetailsLine
|
||||||
y_down = y_pos_down;
|
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
|
//CComponentsDetailsLine
|
||||||
dl_w = CFrameBuffer::getInstance()->scale2Res(2); //NI
|
dl_w = CFrameBuffer::getInstance()->scale2Res(2); //NI
|
||||||
@@ -99,9 +101,6 @@ void CComponentsDetailsLine::paint(bool do_save_bg)
|
|||||||
|
|
||||||
int sw = shadow_w;
|
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_top = y-h_mark_top/2;
|
||||||
int y_mark_down = y_down-h_mark_down/2;
|
int y_mark_down = y_down-h_mark_down/2;
|
||||||
int dx_c = dl_w%2; //correction for odd values
|
int dx_c = dl_w%2; //correction for odd values
|
||||||
|
@@ -67,9 +67,9 @@ class CComponentsDetailsLine : public CComponents
|
|||||||
///set property: lowest y position
|
///set property: lowest y position
|
||||||
void setYPosDown(const int& y_pos_down){y_down = y_pos_down;};
|
void setYPosDown(const int& y_pos_down){y_down = y_pos_down;};
|
||||||
///set property: height of top marker
|
///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
|
///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
|
///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_)
|
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_);}
|
{setXPos(x_pos); setYPos(y_pos); setYPosDown(y_pos_down); setHMarkTop(h_mark_top_); setHMarkDown(h_mark_down_);}
|
||||||
|
@@ -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);
|
CMenuOptionNumberChooser *ch = new CMenuOptionNumberChooser(timing_setting[i].name, &g_settings.timing[i], true, 0, 240);
|
||||||
ch->setNumberFormat(nf);
|
ch->setNumberFormat(nf);
|
||||||
|
ch->setLocalizedValue(0);
|
||||||
|
ch->setLocalizedValueName(LOCALE_OPTIONS_OFF);
|
||||||
ch->setHint("", timing_setting[i].hint);
|
ch->setHint("", timing_setting[i].hint);
|
||||||
menu_timeout->addItem(ch);
|
menu_timeout->addItem(ch);
|
||||||
}
|
}
|
||||||
|
@@ -1172,11 +1172,11 @@ void CMenuWidget::calcSize()
|
|||||||
hint_height = 0;
|
hint_height = 0;
|
||||||
if(g_settings.show_menu_hints && has_hints) {
|
if(g_settings.show_menu_hints && has_hints) {
|
||||||
int lines = 2;
|
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 ! */
|
/* assuming all hint icons has the same size ! */
|
||||||
int icon_width, icon_height;
|
int icon_width, icon_height;
|
||||||
frameBuffer->getIconSize(NEUTRINO_ICON_HINT_TVMODE, &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);
|
hint_height = std::max(icon_height, text_height);
|
||||||
}
|
}
|
||||||
/* set the max height to 9/10 of usable screen height
|
/* set the max height to 9/10 of usable screen height
|
||||||
@@ -1234,11 +1234,12 @@ void CMenuWidget::calcSize()
|
|||||||
// shrink menu if less items
|
// shrink menu if less items
|
||||||
height = std::min(height, hheight + maxItemHeight);
|
height = std::min(height, hheight + maxItemHeight);
|
||||||
/*
|
/*
|
||||||
Always add a bottom offset.
|
Always add a bottom separator offset.
|
||||||
Most menus has an upper offset too,
|
Most menus has an upper offset too,
|
||||||
which is added with the intro-items
|
which is added with the intro-items
|
||||||
*/
|
*/
|
||||||
height += OFFSET_INNER_MID;
|
CMenuItem *separator = new CMenuSeparator();
|
||||||
|
height += separator->getHeight();
|
||||||
|
|
||||||
//scrollbar width
|
//scrollbar width
|
||||||
scrollbar_width=0;
|
scrollbar_width=0;
|
||||||
|
@@ -364,6 +364,8 @@ private:
|
|||||||
void setNumberFormat(std::string format) { numberFormat = format; }
|
void setNumberFormat(std::string format) { numberFormat = format; }
|
||||||
void setNumberFormat(std::string (*fun)(int)) { numberFormatFunction = fun; }
|
void setNumberFormat(std::string (*fun)(int)) { numberFormatFunction = fun; }
|
||||||
void setNumericInput(bool _numeric_input) { numeric_input = _numeric_input; }
|
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
|
class CMenuOptionChooserOptions
|
||||||
|
Reference in New Issue
Block a user