From 775f1a59dfcf3db1c01dffebb77af967cbf3d20d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 1 Sep 2020 09:35:32 +0200 Subject: [PATCH] lv_refr: take opa_scale into account in cover check --- src/lv_core/lv_refr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index 0765fba27..f3166ccd0 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -572,10 +572,15 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj) /*If this object is fully cover the draw area check the children too */ if(_lv_area_is_in(area_p, &obj->coords, 0) && obj->hidden == 0) { - lv_design_res_t design_res = obj->design_cb ? obj->design_cb(obj, area_p, - LV_DESIGN_COVER_CHK) : LV_DESIGN_RES_NOT_COVER; + lv_design_res_t design_res = obj->design_cb(obj, area_p, LV_DESIGN_COVER_CHK); if(design_res == LV_DESIGN_RES_MASKED) return NULL; +#if LV_USE_OPA_SCALE + if(design_res == LV_DESIGN_RES_COVER && lv_obj_get_style_opa_scale(obj, LV_OBJ_PART_MAIN) != LV_OPA_COVER) { + design_res = LV_DESIGN_RES_NOT_COVER; + } +#endif + lv_obj_t * i; _LV_LL_READ(obj->child_ll, i) { found_p = lv_refr_get_top_obj(area_p, i);