From 42a5d7599c8dba172eac0e4bbabc5befc3fbdc1b Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 24 Sep 2017 22:24:26 +0200 Subject: [PATCH 1/5] cc_detailsline.cpp: fix possible unintended reduced height of bottom marker Decrement value removed. Height of bottom marker was decreased on every new repaint if no new height was assigned. Was to see in bouqueteditor while scrolling with bouqets or channel select window. comes in with 19d0c6e98e61b4d35e2fa64e734073583f700806 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/dca7e1017973354afdc31d8d72e021a771955ca2 Author: Thilo Graf Date: 2017-09-24 (Sun, 24 Sep 2017) ------------------ This commit was generated by Migit --- src/gui/components/cc_detailsline.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gui/components/cc_detailsline.cpp b/src/gui/components/cc_detailsline.cpp index 82dd27cca..4184a145c 100644 --- a/src/gui/components/cc_detailsline.cpp +++ b/src/gui/components/cc_detailsline.cpp @@ -96,9 +96,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 From 646884c4e2f5b3bc22726d3052f5a4586970958d Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 25 Sep 2017 08:42:26 +0200 Subject: [PATCH 2/5] detailsline: reduce two times the shadow width from the h_marks Otherwise shadows will be painted lower then the height of the object the detailsline is docked to. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/0abccfac8abbffbe45fa0383039f752963a682fc Author: vanhofen Date: 2017-09-25 (Mon, 25 Sep 2017) Origin message was: ------------------ - detailsline: reduce two times the shadow width from the h_marks Otherwise shadows will be painted lower then the height of the object the detailsline is docked to. ------------------ This commit was generated by Migit --- src/gui/components/cc_detailsline.cpp | 8 +++++--- src/gui/components/cc_detailsline.h | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/gui/components/cc_detailsline.cpp b/src/gui/components/cc_detailsline.cpp index 798be500f..c0e08d095 100644 --- a/src/gui/components/cc_detailsline.cpp +++ b/src/gui/components/cc_detailsline.cpp @@ -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 diff --git a/src/gui/components/cc_detailsline.h b/src/gui/components/cc_detailsline.h index 66197f51f..48f44635e 100644 --- a/src/gui/components/cc_detailsline.h +++ b/src/gui/components/cc_detailsline.h @@ -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_);} From 4736ac986d864e421ecb2bd185d4323d7cde9b10 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 25 Sep 2017 08:42:26 +0200 Subject: [PATCH 3/5] menue: add possibility to add localized values in CMenuOptionNumberChooser seperately Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/45040b0e14a18fc316eb85c45be8bc3cce4d8984 Author: vanhofen Date: 2017-09-25 (Mon, 25 Sep 2017) Origin message was: ------------------ - menue: add possibility to add localized values in CMenuOptionNumberChooser seperately ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/menue.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index ac57996af..a23b2f29c 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -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 From 39392aa9630bd03b361f0a467092b29d271f903e Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 25 Sep 2017 08:42:26 +0200 Subject: [PATCH 4/5] osd-setup: use 0 as a localized value for timeout-settings Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/2bdcd058e4a482450f1625840fd473ae9066df0d Author: vanhofen Date: 2017-09-25 (Mon, 25 Sep 2017) Origin message was: ------------------ - osd-setup: use 0 as a localized value for timeout-settings ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/osd_setup.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 25c8ed147..a7622ade1 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -1103,6 +1103,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); } From d50cc12181100d7035a316961990ed960f2ffc9c Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 25 Sep 2017 08:42:26 +0200 Subject: [PATCH 5/5] menue: user smaller vertical offset for hintboxes to keep it in sync with other vertical offsets * get bottom menu offset from CMenuSeparator()->getHeight() Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/7071ae0852e136bf38dab7190f96c39289803766 Author: vanhofen Date: 2017-09-25 (Mon, 25 Sep 2017) Origin message was: ------------------ - menue: user smaller vertical offset for hintboxes to keep it in sync with other vertical offsets * get bottom menu offset from CMenuSeparator()->getHeight() ------------------ This commit was generated by Migit --- src/gui/widget/menue.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index df73e9680..b34aa4aa7 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1173,11 +1173,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 @@ -1235,11 +1235,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;