mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix a bug in rendering order (scrollbar coverd sibling obejcts too)
This commit is contained in:
parent
aa4897cdc5
commit
523170297e
@ -739,7 +739,7 @@ static void indev_proc_press(lv_indev_proc_t * proc)
|
||||
lv_obj_t * i = proc->types.pointer.act_obj;
|
||||
lv_obj_t * last_top = NULL;
|
||||
while(i != NULL) {
|
||||
if(i->top != 0) last_top = i;
|
||||
if(i->top) last_top = i;
|
||||
i = lv_obj_get_parent(i);
|
||||
}
|
||||
|
||||
|
@ -464,6 +464,9 @@ static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p)
|
||||
i = lv_ll_get_prev(&(par->child_ll), i);
|
||||
}
|
||||
|
||||
/*Call the post draw design function of the parents of the to object*/
|
||||
par->design_cb(par, mask_p, LV_DESIGN_DRAW_POST);
|
||||
|
||||
/*The new border will be there last parents,
|
||||
*so the 'younger' brothers of parent will be refreshed*/
|
||||
border_p = par;
|
||||
@ -471,12 +474,6 @@ static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p)
|
||||
par = lv_obj_get_parent(par);
|
||||
}
|
||||
|
||||
/*Call the post draw design function of the parents of the to object*/
|
||||
par = lv_obj_get_parent(top_p);
|
||||
while(par != NULL) {
|
||||
par->design_cb(par, mask_p, LV_DESIGN_DRAW_POST);
|
||||
par = lv_obj_get_parent(par);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -128,7 +128,9 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_
|
||||
union_ok = lv_area_intersect(&res_a, cords_p, mask_p);
|
||||
|
||||
/*If there are common part of the three area then draw to the vdb*/
|
||||
if(union_ok == false) return;
|
||||
if(union_ok == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
lv_disp_t * disp = lv_refr_get_disp_refreshing();
|
||||
lv_disp_buf_t * vdb = lv_disp_get_buf(disp);
|
||||
|
@ -80,13 +80,17 @@ void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_sty
|
||||
lv_opa_t opa_scale)
|
||||
{
|
||||
if(lv_area_get_height(coords) < 1 || lv_area_get_width(coords) < 1) return;
|
||||
if(lv_area_is_on(coords, mask) == false) return;
|
||||
|
||||
#if LV_USE_SHADOW
|
||||
if(style->body.shadow.width != 0) {
|
||||
lv_draw_shadow(coords, mask, style, opa_scale);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If the object is out of the mask there is nothing to draw.
|
||||
* Draw shadow before it because the shadow is out of `coords`*/
|
||||
if(lv_area_is_on(coords, mask) == false) return;
|
||||
|
||||
if(style->body.opa > LV_OPA_MIN) {
|
||||
lv_draw_rect_main_mid(coords, mask, style, opa_scale);
|
||||
|
||||
@ -1477,7 +1481,7 @@ static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area
|
||||
{
|
||||
bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing());
|
||||
lv_coord_t radius = style->body.radius;
|
||||
lv_coord_t swidth = style->body.shadow.width; // + LV_ANTIALIAS;
|
||||
lv_coord_t swidth = style->body.shadow.width;
|
||||
lv_coord_t width = lv_area_get_width(coords);
|
||||
lv_coord_t height = lv_area_get_height(coords);
|
||||
|
||||
|
@ -631,7 +631,7 @@ static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mo
|
||||
style_tmp.body.border.width = 0;
|
||||
lv_draw_rect(&page->coords, mask, &style_tmp, lv_obj_get_opa_scale(page));
|
||||
|
||||
} else if(mode == LV_DESIGN_DRAW_POST) { /*Draw the scroll bars finally*/
|
||||
} else if(mode == LV_DESIGN_DRAW_POST) {
|
||||
/*Draw only a border*/
|
||||
style_tmp.body.shadow.width = 0;
|
||||
style_tmp.body.opa = LV_OPA_TRANSP;
|
||||
|
Loading…
x
Reference in New Issue
Block a user