fix(obj): fix cover change with semi transparent gradients (#5531)

This commit is contained in:
Gabor Kiss-Vamosi
2024-01-31 20:16:43 +01:00
committed by GitHub
parent 56431ccfe4
commit b9575fb3b7

View File

@@ -424,19 +424,18 @@ static void lv_obj_draw(lv_event_t * e)
info->res = LV_COVER_RES_NOT_COVER;
return;
}
const lv_grad_dsc_t * grad_dsc = lv_obj_get_style_bg_grad(obj, 0);
if(grad_dsc) {
uint32_t i;
for(i = 0; i < grad_dsc->stops_count; i++) {
if(grad_dsc->stops[i].opa < LV_OPA_MAX) {
info->res = LV_COVER_RES_NOT_COVER;
return;
}
}
const lv_grad_dsc_t * grad_dsc = lv_obj_get_style_bg_grad(obj, 0);
if(grad_dsc) {
uint32_t i;
for(i = 0; i < grad_dsc->stops_count; i++) {
if(grad_dsc->stops[i].opa < LV_OPA_MAX) {
info->res = LV_COVER_RES_NOT_COVER;
return;
}
}
}
info->res = LV_COVER_RES_COVER;
}
else if(code == LV_EVENT_DRAW_MAIN) {
lv_layer_t * layer = lv_event_get_layer(e);