From: SangHyeon Lee Date: Fri, 5 Jan 2018 08:04:04 +0000 (+0900) Subject: genlist: fix white bg issue in item clip unset X-Git-Tag: accepted/tizen/unified/20180111.074150~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3bfad64789ba4bc3a41a94d5302d22fd938a114e;p=platform%2Fupstream%2Felementary.git genlist: fix white bg issue in item clip unset Change-Id: If610c2ec963452e971aaa9ea08b443b13d4a695b Signed-off-by: SangHyeon Lee --- diff --git a/src/mobile_lib/elm_genlist.c b/src/mobile_lib/elm_genlist.c index 49048d9..cf978fc 100644 --- a/src/mobile_lib/elm_genlist.c +++ b/src/mobile_lib/elm_genlist.c @@ -1879,21 +1879,16 @@ _item_realize(Elm_Gen_Item *it, if (vi_effect && !strcmp(vi_effect, "on")) { Evas_Object *clip = evas_object_clip_get(VIEW(it)); - const Eina_List *clipees = evas_object_clipees_get(clip); - // FIXME: This clipee rect is prevent white rect generation by all clip unset. - if ((eina_list_count(clipees) <= 2) && !sd->clipee) - { - sd->clipee = evas_object_rectangle_add(evas_object_evas_get(WIDGET(it))); - evas_object_color_set(sd->clipee, 0, 0, 0, 0); - evas_object_clip_set(sd->clipee, clip); - } + if (clip) evas_object_data_set(VIEW(it), "view,clip", clip); + else clip = evas_object_data_get(VIEW(it), "view,clip"); + if (!it->item->proxy) { it->item->proxy = evas_object_image_filled_add(evas_object_evas_get(wd->obj)); evas_object_smart_member_add(it->item->proxy, sd->pan_obj); } - evas_object_clip_set(it->item->proxy, evas_object_clip_get(sd->pan_obj)); - evas_object_clip_unset(VIEW(it)); + evas_object_clip_set(it->item->proxy, clip); + if (evas_object_clip_get(VIEW(it))) evas_object_clip_unset(VIEW(it)); evas_object_image_source_set(it->item->proxy, VIEW(it)); evas_object_image_source_visible_set(it->item->proxy, EINA_FALSE); evas_object_image_source_events_set(it->item->proxy, EINA_TRUE); @@ -5991,7 +5986,6 @@ _elm_genlist_evas_object_smart_del(Eo *obj, Elm_Genlist_Data *sd) _evas_viewport_resize_cb, sd); if (sd->size_caches) eina_hash_free(sd->size_caches); if (sd->decorate_it_type) eina_stringshare_del(sd->decorate_it_type); - if (sd->clipee) evas_object_del(sd->clipee); evas_object_del(sd->pan_obj); eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); diff --git a/src/mobile_lib/elm_widget_genlist.h b/src/mobile_lib/elm_widget_genlist.h index e7ee4a0..6f6fa6d 100644 --- a/src/mobile_lib/elm_widget_genlist.h +++ b/src/mobile_lib/elm_widget_genlist.h @@ -225,7 +225,6 @@ struct _Elm_Genlist_Data Eina_Bool bottom_margin_enabled : 1; Eina_Bool unhighlighted : 1; Evas_Object *focus_bg; - Evas_Object *clipee; Eina_Bool focus_on_selection_enabled : 1; };