From f59ef7fcf6229206f61e1fac0629dc6c4acdc670 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 30 Aug 2016 11:01:26 +0200 Subject: [PATCH 1/2] CComponentsHeader: don't use default parameters for privat member Unified adaptation related to child class ComponentsFooter. see: c7fb4c534329307c194a4de3376ecab030a5ea89 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/731cb9c66d9de9ebfadfe86d81f3871002eff820 Author: Thilo Graf Date: 2016-08-30 (Tue, 30 Aug 2016) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_header.cpp | 2 +- src/gui/components/cc_frm_header.h | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index cd9af8bfc..c1613516d 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -43,7 +43,7 @@ using namespace std; CComponentsHeader::CComponentsHeader(CComponentsForm* parent) { //CComponentsHeader - initVarHeader(1, 1, 0, 0, "", "", 0, parent); + initVarHeader(1, 1, 0, 0, "", "", 0, parent, CC_SHADOW_OFF, COL_MENUCONTENT_PLUS_6, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0); } CComponentsHeader::CComponentsHeader( const int& x_pos, const int& y_pos, const int& w, const int& h, diff --git a/src/gui/components/cc_frm_header.h b/src/gui/components/cc_frm_header.h index fda8f4835..178520b42 100644 --- a/src/gui/components/cc_frm_header.h +++ b/src/gui/components/cc_frm_header.h @@ -40,15 +40,15 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen { private: ///member: init genaral variables, parameters for mostly used properties - void initVarHeader( const int& x_pos, const int& y_pos, const int& w, const int& h = 0, - const std::string& caption = "header", - const std::string& = "", - const int& buttons = 0, - CComponentsForm *parent = NULL, - int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, - fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, - fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + void initVarHeader( const int& x_pos, const int& y_pos, const int& w, const int& h, + const std::string& caption, + const std::string& icon_name, + const int& buttons, + CComponentsForm *parent, + int shadow_mode, + fb_pixel_t color_frame, + fb_pixel_t color_body, + fb_pixel_t color_shadow); protected: ///object: icon object, see also setIcon() From bd1cc4cbed10a36387eba58d642d07545f9db5aa Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 31 Aug 2016 10:03:52 +0200 Subject: [PATCH 2/2] CFrameBuffer: add debug warning if radius < 0 Radius < 0 causes for wrong rendering. paintBoxRel() gets confused. This will paint partial outside of renderbox. TODO: This should be fixed. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/ed0154a9739ab2c8832fb52336e0e7b454188331 Author: Thilo Graf Date: 2016-08-31 (Wed, 31 Aug 2016) ------------------ This commit was generated by Migit --- src/driver/framebuffer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index e7c7ad682..c1877bb2d 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -819,9 +819,11 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int return; if (dx == 0 || dy == 0) { - dprintf(DEBUG_NORMAL, "[CFrameBuffer] [%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __FUNCTION__, __LINE__, radius, x, y, x+dx, y+dy); + dprintf(DEBUG_NORMAL, "[CFrameBuffer] [%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __func__, __LINE__, radius, x, y, x+dx, y+dy); return; } + if (radius < 0) + dprintf(DEBUG_NORMAL, "[CFrameBuffer] [%s - %d]: WARNING! radius < 0 [%d] FIXME\n", __func__, __LINE__, radius); checkFbArea(x, y, dx, dy, true);