genlist: fix white bg issue in item clip unset 24/166024/3
authorSangHyeon Lee <sh10233.lee@samsung.com>
Fri, 5 Jan 2018 08:04:04 +0000 (17:04 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Mon, 8 Jan 2018 09:43:45 +0000 (09:43 +0000)
Change-Id: If610c2ec963452e971aaa9ea08b443b13d4a695b
Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
src/mobile_lib/elm_genlist.c
src/mobile_lib/elm_widget_genlist.h

index 49048d9..cf978fc 100644 (file)
@@ -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());
index e7ee4a0..6f6fa6d 100644 (file)
@@ -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;
 };