diff --git a/src/gui/components/cc_base.cpp b/src/gui/components/cc_base.cpp index 009ef49c9..bffb827dc 100644 --- a/src/gui/components/cc_base.cpp +++ b/src/gui/components/cc_base.cpp @@ -228,13 +228,20 @@ inline void CComponents::hide() } //erase or paint over rendered objects -void CComponents::kill(const fb_pixel_t& bg_color) +void CComponents::kill(const fb_pixel_t& bg_color, const int& corner_radius) { for(size_t i =0; i< v_fbdata.size() ;i++){ - if (bg_color) - frameBuffer->paintBoxRel(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, bg_color, v_fbdata[i].r, corner_type); +#if 0 + if (bg_color != COL_BACKGROUND) +#endif + int r = v_fbdata[i].r; + if (corner_radius > -1) + r = corner_radius; + frameBuffer->paintBoxRel(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, bg_color, r, corner_type); +#if 0 else frameBuffer->paintBackgroundBoxRel(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy); +#endif } clearFbData(); firstPaint = true; diff --git a/src/gui/components/cc_base.h b/src/gui/components/cc_base.h index 5c991366e..40e764c00 100644 --- a/src/gui/components/cc_base.h +++ b/src/gui/components/cc_base.h @@ -204,7 +204,7 @@ class CComponents ///erase or paint over rendered objects without restore of background, it's similar to paintBackgroundBoxRel() known ///from CFrameBuffer but with possiblity to define color, default color is COL_BACKGROUND (empty background) - virtual void kill(const fb_pixel_t& bg_color = COL_BACKGROUND); + virtual void kill(const fb_pixel_t& bg_color = COL_BACKGROUND, const int& corner_radius = -1); ///returns paint mode, true=item was painted virtual bool isPainted(){return is_painted;} diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 466bec66d..e727fb6c1 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -138,12 +138,12 @@ void CComponentsItem::hide(bool no_restore) void CComponentsItem::kill(const fb_pixel_t& bg_color, bool ignore_parent) { if(cc_parent == NULL){ - CComponents::kill(bg_color); + CComponents::kill(bg_color, this->corner_rad); }else{ if(ignore_parent) - CComponents::kill(bg_color); + CComponents::kill(bg_color, this->corner_rad); else - CComponents::kill(cc_parent->getColorBody()); + CComponents::kill(cc_parent->getColorBody(), cc_parent->getCornerRadius()); } }