diff --git a/src/gui/components/cc_base.cpp b/src/gui/components/cc_base.cpp index 95df476cb..37548d4ba 100644 --- a/src/gui/components/cc_base.cpp +++ b/src/gui/components/cc_base.cpp @@ -64,8 +64,8 @@ CComponents::CComponents() : COSDFader(g_settings.theme.menu_Content_alpha) frameBuffer = CFrameBuffer::getInstance(); v_fbdata.clear(); saved_screen.pixbuf = NULL; - gradientBuf = NULL; - paintGradient = false; + cc_gradientBuf = NULL; + col_body_gradient = false; } CComponents::~CComponents() @@ -202,7 +202,7 @@ void CComponents::paintFbItems(bool do_save_bg) } else { if(cc_allow_paint) { - if (paintGradient && (v_fbdata[i].fbdata_type == CC_FBDATA_TYPE_BOX) && (v_fbdata[i].data != NULL)) { + if (col_body_gradient && (v_fbdata[i].fbdata_type == CC_FBDATA_TYPE_BOX) && (v_fbdata[i].data != NULL)) { // color gradient gradientData_t *gradientData = static_cast (v_fbdata[i].data); if (gradientData->boxBuf == NULL) @@ -318,7 +318,7 @@ void CComponents::setFrameThickness(const int& thickness, const int& thickness_s } -void CComponents::setPaintGradient(bool do_paint_gradient) +void CComponents::enableColBodyGradient(bool do_paint_gradient) { - paintGradient = g_settings.gradiant ? do_paint_gradient : false; + col_body_gradient = g_settings.gradiant ? do_paint_gradient : false; } diff --git a/src/gui/components/cc_base.h b/src/gui/components/cc_base.h index e20330fd9..cfbaa7873 100644 --- a/src/gui/components/cc_base.h +++ b/src/gui/components/cc_base.h @@ -81,9 +81,9 @@ class CComponents : public CComponentsSignals, public COSDFader ///property: contains data for gradiant handling gradientData_t cc_gradientData; ///gradiant pixel buffer - fb_pixel_t *gradientBuf; - ///property: true component can paint gradient, see also setPaintGradient() - bool paintGradient; + fb_pixel_t *cc_gradientBuf; + ///property: true component can paint gradient, see also enableColBodyGradient() + bool col_body_gradient; ///property: true=component has shadow bool shadow; @@ -187,7 +187,7 @@ class CComponents : public CComponentsSignals, public COSDFader ///Note: Possible color values are defined in "gui/color.h" and "gui/customcolor.h" inline virtual void setColorAll(fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow){col_frame = color_frame; col_body = color_body; col_shadow = color_shadow;}; ///set color gradient on/off - virtual void setPaintGradient(bool do_paint_gradient); + virtual void enableColBodyGradient(bool do_paint_gradient); ///get frame color inline virtual fb_pixel_t getColorFrame(){return col_frame;}; diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index 1db98fec7..87687b29e 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -76,7 +76,7 @@ void CComponentsFooter::initVarFooter( const int& x_pos, const int& y_pos, const col_frame = color_frame; col_body = color_body; col_shadow = color_shadow; - paintGradient = false; + col_body_gradient = false; corner_rad = RADIUS_LARGE; corner_type = CORNER_BOTTOM; diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 45173a4bc..b085267f6 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -98,6 +98,7 @@ void CComponentsHeader::initVarHeader( const int& x_pos, const int& y_pos, const col_body = color_body; col_shadow = color_shadow; col_body = COL_MENUHEAD_PLUS_0; + col_body_gradient = g_settings.gradiant; cch_text = caption; cch_icon_name = icon_name; @@ -115,7 +116,6 @@ void CComponentsHeader::initVarHeader( const int& x_pos, const int& y_pos, const cch_icon_w = 0; cch_text_x = cch_offset; cch_buttons_space = cch_offset; - paintGradient = g_settings.gradiant; addContextButton(buttons); initCCItems(); @@ -126,8 +126,8 @@ CComponentsHeader::~CComponentsHeader() { dprintf(DEBUG_DEBUG, "[~CComponentsHeader] [%s - %d] delete...\n", __func__, __LINE__); v_cch_btn.clear(); - if (gradientBuf) - free(gradientBuf); + if (cc_gradientBuf) + free(cc_gradientBuf); } void CComponentsHeader::setCaption(const std::string& caption, const int& align_mode) @@ -391,11 +391,11 @@ void CComponentsHeader::initCaption() void CComponentsHeader::initGradient() { - if (gradientBuf == NULL) { + if (cc_gradientBuf == NULL) { CColorGradient ccGradient; - gradientBuf = ccGradient.gradientOneColor(col_body, NULL, height, CColorGradient::gradientLight2Dark, CColorGradient::light); + cc_gradientBuf = ccGradient.gradientOneColor(col_body, NULL, height, CColorGradient::gradientLight2Dark, CColorGradient::light); } - cc_gradientData.gradientBuf = gradientBuf; + cc_gradientData.gradientBuf = cc_gradientBuf; cc_gradientData.direction = CFrameBuffer::gradientVertical; cc_gradientData.mode = CFrameBuffer::pbrg_noOption; @@ -419,7 +419,7 @@ void CComponentsHeader::initCCItems() initCaption(); //init color gradient - if (paintGradient) + if (col_body_gradient) initGradient(); }