From: JunsuChoi Date: Wed, 11 Oct 2017 13:09:14 +0000 (+0900) Subject: atspi : Do not center align when genlist item is highlighted in wearable profile X-Git-Tag: accepted/tizen/unified/20171025.075156~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ba9b7e4e082a44a737dcc647bdab4d70402f0b02;p=platform%2Fupstream%2Felementary.git atspi : Do not center align when genlist item is highlighted in wearable profile Change-Id: Ie6f5d80b5dc100ba1fc7af84607cefa3bb15939b --- diff --git a/src/mobile_lib/elm_genlist.c b/src/mobile_lib/elm_genlist.c index 37c4950..69a7305 100644 --- a/src/mobile_lib/elm_genlist.c +++ b/src/mobile_lib/elm_genlist.c @@ -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