fix(obj): fix cover change with semi transparent gradients (#5531)
This commit is contained in:
committed by
GitHub
parent
56431ccfe4
commit
b9575fb3b7
@@ -424,19 +424,18 @@ static void lv_obj_draw(lv_event_t * e)
|
|||||||
info->res = LV_COVER_RES_NOT_COVER;
|
info->res = LV_COVER_RES_NOT_COVER;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const lv_grad_dsc_t * grad_dsc = lv_obj_get_style_bg_grad(obj, 0);
|
}
|
||||||
if(grad_dsc) {
|
const lv_grad_dsc_t * grad_dsc = lv_obj_get_style_bg_grad(obj, 0);
|
||||||
uint32_t i;
|
if(grad_dsc) {
|
||||||
for(i = 0; i < grad_dsc->stops_count; i++) {
|
uint32_t i;
|
||||||
if(grad_dsc->stops[i].opa < LV_OPA_MAX) {
|
for(i = 0; i < grad_dsc->stops_count; i++) {
|
||||||
info->res = LV_COVER_RES_NOT_COVER;
|
if(grad_dsc->stops[i].opa < LV_OPA_MAX) {
|
||||||
return;
|
info->res = LV_COVER_RES_NOT_COVER;
|
||||||
}
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
info->res = LV_COVER_RES_COVER;
|
info->res = LV_COVER_RES_COVER;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(code == LV_EVENT_DRAW_MAIN) {
|
else if(code == LV_EVENT_DRAW_MAIN) {
|
||||||
lv_layer_t * layer = lv_event_get_layer(e);
|
lv_layer_t * layer = lv_event_get_layer(e);
|
||||||
|
|||||||
Reference in New Issue
Block a user