elm_gen: highlight itself when there are no items

Summary:
When there are no items in genlist/gengrid, highlight stays at one dot of
top-left corner. This patch makes genlist/gengrid itself highlighted
when there are no items.

Reviewers: jpeg, SanghyeonLee

Differential Revision: https://phab.enlightenment.org/D3701

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Jee-Yong Um 2016-02-17 17:02:14 -08:00 committed by Cedric BAIL
parent 89f07527cd
commit f34b1d40fa
2 changed files with 12 additions and 2 deletions

View File

@ -5565,7 +5565,7 @@ elm_gengrid_nth_item_get(const Evas_Object *obj, unsigned int nth)
}
EOLIAN static void
_elm_gengrid_elm_widget_focus_highlight_geometry_get(const Eo *obj EINA_UNUSED, Elm_Gengrid_Data *sd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
_elm_gengrid_elm_widget_focus_highlight_geometry_get(const Eo *obj, Elm_Gengrid_Data *sd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
{
Evas_Coord ox, oy, oh, ow, item_x = 0, item_y = 0, item_w = 0, item_h = 0;
@ -5577,6 +5577,11 @@ _elm_gengrid_elm_widget_focus_highlight_geometry_get(const Eo *obj EINA_UNUSED,
evas_object_geometry_get(VIEW(focus_it), &item_x, &item_y, &item_w, &item_h);
elm_widget_focus_highlight_focus_part_geometry_get(VIEW(focus_it), &item_x, &item_y, &item_w, &item_h);
}
else
{
evas_object_geometry_get(obj, x, y, w, h);
return;
}
*x = item_x;
*y = item_y;

View File

@ -8223,7 +8223,7 @@ elm_genlist_nth_item_get(const Evas_Object *obj, unsigned int nth)
}
EOLIAN static void
_elm_genlist_elm_widget_focus_highlight_geometry_get(const Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
_elm_genlist_elm_widget_focus_highlight_geometry_get(const Eo *obj, Elm_Genlist_Data *sd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
{
Evas_Coord ox, oy, oh, ow, item_x = 0, item_y = 0, item_w = 0, item_h = 0;
@ -8235,6 +8235,11 @@ _elm_genlist_elm_widget_focus_highlight_geometry_get(const Eo *obj EINA_UNUSED,
evas_object_geometry_get(VIEW(focus_it), &item_x, &item_y, &item_w, &item_h);
elm_widget_focus_highlight_focus_part_geometry_get(VIEW(focus_it), &item_x, &item_y, &item_w, &item_h);
}
else
{
evas_object_geometry_get(obj, x, y, w, h);
return;
}
*x = item_x;
*y = item_y;