mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
CCDraw: add new attribut force_paint_bg
should help for some repaint actions
This commit is contained in:
@@ -57,6 +57,7 @@ CCDraw::CCDraw() : COSDFader(g_settings.theme.menu_Content_alpha)
|
|||||||
cc_save_bg = false;
|
cc_save_bg = false;
|
||||||
firstPaint = true;
|
firstPaint = true;
|
||||||
is_painted = false;
|
is_painted = false;
|
||||||
|
force_paint_bg = false;
|
||||||
paint_bg = true;
|
paint_bg = true;
|
||||||
cc_allow_paint = true;
|
cc_allow_paint = true;
|
||||||
cc_enable_frame = true;
|
cc_enable_frame = true;
|
||||||
@@ -546,7 +547,7 @@ void CCDraw::paintFbItems(bool do_save_bg)
|
|||||||
v_fbdata[i].is_painted = true;
|
v_fbdata[i].is_painted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fbtype == CC_FBDATA_TYPE_SHADOW_BOX && ((!is_painted || !fbdata.is_painted)|| shadow_force)) {
|
if (fbtype == CC_FBDATA_TYPE_SHADOW_BOX && ((!is_painted || !fbdata.is_painted)|| shadow_force || force_paint_bg)) {
|
||||||
if (fbdata.enabled) {
|
if (fbdata.enabled) {
|
||||||
/* here we paint the shadow around the body
|
/* here we paint the shadow around the body
|
||||||
* on 1st step we check for already cached screen buffer, if true
|
* on 1st step we check for already cached screen buffer, if true
|
||||||
@@ -637,7 +638,19 @@ void CCDraw::paintFbItems(bool do_save_bg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//set is_painted attribut. if any layer was painted set it to true;
|
//set is_painted attribut. if any layer was painted set it to true;
|
||||||
is_painted = isPainted();
|
if (force_paint_bg){
|
||||||
|
is_painted = false;
|
||||||
|
}else{
|
||||||
|
for(size_t i=0; i< v_fbdata.size(); i++){
|
||||||
|
if (v_fbdata[i].is_painted){
|
||||||
|
is_painted = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//reset is painted ignore flag to default value
|
||||||
|
force_paint_bg = false;
|
||||||
|
|
||||||
//pick up signal if filled
|
//pick up signal if filled
|
||||||
OnAfterPaintLayers();
|
OnAfterPaintLayers();
|
||||||
@@ -645,14 +658,7 @@ void CCDraw::paintFbItems(bool do_save_bg)
|
|||||||
|
|
||||||
bool CCDraw::isPainted()
|
bool CCDraw::isPainted()
|
||||||
{
|
{
|
||||||
if (firstPaint)
|
return is_painted;
|
||||||
return false;
|
|
||||||
|
|
||||||
for(size_t i=0; i< v_fbdata.size(); i++)
|
|
||||||
if (v_fbdata[i].is_painted)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCDraw::hide()
|
void CCDraw::hide()
|
||||||
@@ -670,7 +676,7 @@ void CCDraw::hide()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
firstPaint = true;
|
firstPaint = true;
|
||||||
is_painted = isPainted();
|
is_painted = false;
|
||||||
OnAfterHide();
|
OnAfterHide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -716,7 +722,7 @@ void CCDraw::kill(const fb_pixel_t& bg_color, const int& corner_radius, const in
|
|||||||
|
|
||||||
if (fblayer_type == CC_FBDATA_TYPES){
|
if (fblayer_type == CC_FBDATA_TYPES){
|
||||||
firstPaint = true;
|
firstPaint = true;
|
||||||
is_painted = isPainted();
|
is_painted = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -114,7 +114,9 @@ class CCDraw : public COSDFader, public CComponentsSignals
|
|||||||
///status: true=component was painted for 1st time
|
///status: true=component was painted for 1st time
|
||||||
bool firstPaint;
|
bool firstPaint;
|
||||||
///status: true=component was rendered
|
///status: true=component was rendered
|
||||||
// bool is_painted;
|
bool is_painted;
|
||||||
|
///status: true= value is_painted would be ignored
|
||||||
|
bool force_paint_bg;
|
||||||
///mode: true=activate rendering of basic elements (frame, shadow and body)
|
///mode: true=activate rendering of basic elements (frame, shadow and body)
|
||||||
bool paint_bg;
|
bool paint_bg;
|
||||||
///mode: true=activate rendering of frame
|
///mode: true=activate rendering of frame
|
||||||
|
Reference in New Issue
Block a user