mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(obj): fix cover change with semi transparent gradients (#5531)
This commit is contained in:
parent
56431ccfe4
commit
b9575fb3b7
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user