From e410e07c0c4c6e14affea2855e944b65cc68ef5d Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 21 May 2017 18:00:21 +0200 Subject: [PATCH 1/4] CHintBox: use less colors time scale mode for visual timeout Otherwise probably in this context to much colored with default settings. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/8c29b8e68f3886ead091d1a4f7e50dd99d727ff4 Author: Thilo Graf Date: 2017-05-21 (Sun, 21 May 2017) ------------------ This commit was generated by Migit --- src/gui/widget/hintbox.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index 47d0e474c..e0eec64f8 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -188,6 +188,7 @@ void CHintBox::enableTimeOutBar(bool enable) timeout_pb->setValues(timeout_pb->getValue()+1, 100*timeout); }else{ timeout_pb = new CProgressBar(); + timeout_pb->setType(CProgressBar::PB_TIMESCALE); timeout_pb->setDimensionsAll(ccw_body->getRealXPos(), ccw_body->getRealYPos(), ccw_body->getWidth(), TIMEOUT_BAR_HEIGHT); timeout_pb->setValues(0, 100*timeout); if (!timeout_pb_timer) { From 5f3926af4e07566cec2f27fa20dfdb53d77ebb96 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 21 May 2017 18:00:21 +0200 Subject: [PATCH 2/4] CMsgBox: fix paint of footer buttons Only paint of button container is required. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/37387a3e690dd6684c9713a30325626a88cc8d48 Author: Thilo Graf Date: 2017-05-21 (Sun, 21 May 2017) ------------------ This commit was generated by Migit --- src/gui/widget/msgbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index eb40539cb..c1cdbfe30 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -335,7 +335,7 @@ int CMsgBox::exec() void CMsgBox::refreshFoot(void) { - ccw_footer->paint(false); + ccw_footer->getButtonChainObject()->paint(); } From 1c3c6bf230c433d91dc62e168dbc44c44545dd25 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 21 May 2017 18:00:21 +0200 Subject: [PATCH 3/4] cc_item.h/cc_frm.h/cc_frm_button.h: use pre defined frame color as default Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9132e7de8262e4930c8b18b8890d04016525ae4c Author: Thilo Graf Date: 2017-05-21 (Sun, 21 May 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_frm.h | 4 ++-- src/gui/components/cc_frm_button.h | 24 ++++++++++++------------ src/gui/components/cc_item.h | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/gui/components/cc_frm.h b/src/gui/components/cc_frm.h index 59f488fdb..f1aba0a9c 100644 --- a/src/gui/components/cc_frm.h +++ b/src/gui/components/cc_frm.h @@ -157,7 +157,7 @@ class CComponentsForm : public CComponentsItem ///select a definied item, parameter1 as size_t virtual void setSelectedItem( int item_id, const fb_pixel_t& sel_frame_col = COL_MENUCONTENTSELECTED_PLUS_0, - const fb_pixel_t& frame_col = COL_SHADOW_PLUS_0, + const fb_pixel_t& frame_col = COL_FRAME_PLUS_0, const fb_pixel_t& sel_body_col = COL_MENUCONTENT_PLUS_0, const fb_pixel_t& body_col = COL_MENUCONTENT_PLUS_0, const int& frame_w = 3, @@ -165,7 +165,7 @@ class CComponentsForm : public CComponentsItem ///select a definied item, parameter1 as CComponentsItem* virtual void setSelectedItem( CComponentsItem* cc_item, const fb_pixel_t& sel_frame_col = COL_MENUCONTENTSELECTED_PLUS_0, - const fb_pixel_t& frame_col = COL_SHADOW_PLUS_0, + const fb_pixel_t& frame_col = COL_FRAME_PLUS_0, const fb_pixel_t& sel_body_col = COL_MENUCONTENT_PLUS_0, const fb_pixel_t& body_col = COL_MENUCONTENT_PLUS_0, const int& frame_w = 3, diff --git a/src/gui/components/cc_frm_button.h b/src/gui/components/cc_frm_button.h index 1e36bd826..c85777ff7 100644 --- a/src/gui/components/cc_frm_button.h +++ b/src/gui/components/cc_frm_button.h @@ -103,7 +103,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h, const neutrino_locale_t& caption_locale, @@ -112,7 +112,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h, const neutrino_locale_t& caption_locale, @@ -121,7 +121,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h, const std::string& caption, @@ -130,7 +130,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); ///set text color void setButtonTextColor(fb_pixel_t caption_color){cc_btn_text_col = caption_color;}; @@ -246,7 +246,7 @@ class CComponentsButtonRed : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_RED, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_RED; @@ -257,7 +257,7 @@ class CComponentsButtonRed : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_RED, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_RED; @@ -277,7 +277,7 @@ class CComponentsButtonGreen : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_GREEN, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_GREEN; @@ -289,7 +289,7 @@ class CComponentsButtonGreen : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_GREEN, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_GREEN; @@ -309,7 +309,7 @@ class CComponentsButtonYellow : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_YELLOW, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_YELLOW; @@ -320,7 +320,7 @@ class CComponentsButtonYellow : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_YELLOW, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_YELLOW; @@ -340,7 +340,7 @@ class CComponentsButtonBlue : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_BLUE, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_BLUE; @@ -351,7 +351,7 @@ class CComponentsButtonBlue : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_BLUE, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_BLUE; diff --git a/src/gui/components/cc_item.h b/src/gui/components/cc_item.h index 37677a813..9d633ad62 100644 --- a/src/gui/components/cc_item.h +++ b/src/gui/components/cc_item.h @@ -110,7 +110,7 @@ class CComponentsItem : public CComponents ///set select mode virtual void setSelected(bool selected, const fb_pixel_t& sel_frame_col = COL_MENUCONTENTSELECTED_PLUS_0, - const fb_pixel_t& frame_col = COL_SHADOW_PLUS_0, + const fb_pixel_t& frame_col = COL_FRAME_PLUS_0, const fb_pixel_t& sel_body_col = COL_MENUCONTENT_PLUS_0, const fb_pixel_t& body_col = COL_MENUCONTENT_PLUS_0, const int& frame_w = 3, From c6c255a2f235cf0c419424b39fd0ac270277c3fd Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 21 May 2017 18:00:21 +0200 Subject: [PATCH 4/4] CComponentsButton: add missing init of col_body_old Some changes on runtime were ignored on runtime. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/36c8f4c24f45d2c97b48f8bccb3f2b923333792a Author: Thilo Graf Date: 2017-05-21 (Sun, 21 May 2017) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_button.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index b7e964356..c7215b4fc 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -106,7 +106,7 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const cc_body_gradient_enable = CC_COLGRAD_OFF/*g_settings.gradiant*/; //TODO: gradient is prepared for use but disabled at the moment till some other parts of gui parts are provide gradient setColBodyGradient(cc_body_gradient_enable/*CColorGradient::gradientLight2Dark*/, CFrameBuffer::gradientVertical, CColorGradient::light); col_frame = color_frame; - col_body = cc_body_gradient_enable? COL_DARK_GRAY : color_body; + col_body = col_body_old = cc_body_gradient_enable? COL_DARK_GRAY : color_body; col_shadow = color_shadow; cc_item_enabled = enabled;