atspi : Do not center align when genlist item is highlighted in wearable profile 75/154975/4
authorJunsuChoi <jsuya.choi@samsung.com>
Wed, 11 Oct 2017 13:09:14 +0000 (22:09 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Fri, 13 Oct 2017 05:17:54 +0000 (05:17 +0000)
Change-Id: Ief1158011fd204cb10eed4b3576518dd7d55d64f

src/mobile_lib/elm_genlist.c

index 37c4950..69a7305 100644 (file)
@@ -8771,25 +8771,23 @@ _elm_genlist_item_elm_interface_atspi_component_highlight_grab(Eo *eo_it, Elm_Ge
      }
    else
      {
-        // if item is realized check if in viewport
-        if (VIEW(it))
-          {
-             Evas_Coord wy, wh, y, h;
-             evas_object_geometry_get(WIDGET(it), NULL, &wy, NULL, &wh);
-             evas_object_geometry_get(VIEW(it), NULL, &y, NULL, &h);
-             //TIZEN_ONLY(20161104) : Accessibility : synchronized highlight of atspi and item align feature for wearable profile
-             elm_genlist_item_bring_in(eo_it, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
-             //
+        // TIZEN_ONLY(20171011) : atspi : Do not center align when genlist item is highlighted in wearable profile
+        //FIXME : First, last item is called centered because it may not have a proxy image.
+        //        This part will be revised in the next version.
+        Eina_List *realized = elm_genlist_realized_items_get(WIDGET(it));
+        if (VIEW(it) || realized)
+          {
+             Elm_Object_Item *first_it = elm_genlist_first_item_get(WIDGET(it));
+             Elm_Object_Item *last_it = elm_genlist_last_item_get(WIDGET(it));
+             if (first_it == eo_it || last_it == eo_it)
+               elm_genlist_item_bring_in(eo_it, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
+             else
+               elm_genlist_item_bring_in(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN);
            }
-        else // if item is not realized we should search if we are over or below viewport
-          {
-             Eina_List *realized = elm_genlist_realized_items_get(WIDGET(it));
-             if (realized)
-               {
-                  elm_genlist_item_bring_in(eo_it, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
-                  eina_list_free(realized);
-               }
-          }
+        if (realized)
+          eina_list_free(realized);
+        //
+
         if (VIEW(it))
            elm_object_accessibility_highlight_set(EO_OBJ(it), EINA_TRUE);
         ///TIZEN_ONLY(20170717) : expose highlight information on atspi