summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-05-11 17:53:00 +0900
committerDaniel Juyung Seo <juyung.seo@samsung.com>2014-05-11 22:42:15 +0900
commit4e7b54066a45178abaa1b1c2a76c82e09c9392ac (patch)
treec2acc8dbf1dbe4e78a3c2211340bc9559a9828ae
parent30cada36967a49da784d8f2bb2b1bffc911d64b6 (diff)
Revert "remove all scrolling changes for focused items."
This reverts commit 377179bdaf84aa1a86621cdfa64ed43613ab9d45. The main claim of https://phab.enlightenment.org/T1205 was fixed in the previous commit 30cada369. This code will be modifed again in the next commit due to the api change during development life cycle. Note: do not blindly revert this commit if you have any problem with widget item focus. This commit is not related to any fundamental cause of the issues. If you have a problem, please contact me first. seojuyung2@gmail.com or SeoZ on IRC. Thanks.
-rw-r--r--src/lib/elm_gengrid.c6
-rw-r--r--src/lib/elm_genlist.c6
-rw-r--r--src/lib/elm_list.c10
-rw-r--r--src/lib/elm_toolbar.c6
4 files changed, 28 insertions, 0 deletions
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index ab7a57455..b91ddc5f2 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -1487,6 +1487,12 @@ _elm_gengrid_item_focused(Elm_Gen_Item *it)
1487 (elm_widget_item_disabled_get(it))) 1487 (elm_widget_item_disabled_get(it)))
1488 return; 1488 return;
1489 1489
1490 if (!_elm_config->focus_auto_scroll_bring_in_enable)
1491 elm_gengrid_item_show
1492 ((Elm_Object_Item *)it, ELM_GENGRID_ITEM_SCROLLTO_IN);
1493 else
1494 elm_gengrid_item_bring_in
1495 ((Elm_Object_Item *)it, ELM_GENGRID_ITEM_SCROLLTO_IN);
1490 sd->focused_item = (Elm_Object_Item *)it; 1496 sd->focused_item = (Elm_Object_Item *)it;
1491 1497
1492 if (elm_widget_focus_highlight_enabled_get(obj)) 1498 if (elm_widget_focus_highlight_enabled_get(obj))
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 0e5caba70..c220d340d 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -2432,6 +2432,12 @@ _elm_genlist_item_focused(Elm_Gen_Item *it)
2432 (elm_widget_item_disabled_get(it))) 2432 (elm_widget_item_disabled_get(it)))
2433 return; 2433 return;
2434 2434
2435 if (!_elm_config->focus_auto_scroll_bring_in_enable)
2436 elm_genlist_item_show((Elm_Object_Item *)it,
2437 ELM_GENLIST_ITEM_SCROLLTO_IN);
2438 else
2439 elm_genlist_item_bring_in((Elm_Object_Item *)it,
2440 ELM_GENLIST_ITEM_SCROLLTO_IN);
2435 sd->focused_item = (Elm_Object_Item *)it; 2441 sd->focused_item = (Elm_Object_Item *)it;
2436 2442
2437 if (elm_widget_focus_highlight_enabled_get(obj)) 2443 if (elm_widget_focus_highlight_enabled_get(obj))
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index 7b0cc06a9..9ebe5a11f 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -1084,11 +1084,21 @@ static void
1084_elm_list_item_focused(Elm_List_Item *it) 1084_elm_list_item_focused(Elm_List_Item *it)
1085{ 1085{
1086 ELM_LIST_DATA_GET(WIDGET(it), sd); 1086 ELM_LIST_DATA_GET(WIDGET(it), sd);
1087 Evas_Coord x, y, w, h, sx, sy, sw, sh;
1087 const char *focus_raise; 1088 const char *focus_raise;
1088 1089
1089 if ((!sd) || (sd->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) || 1090 if ((!sd) || (sd->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) ||
1090 (it == (Elm_List_Item *)sd->focused_item)) 1091 (it == (Elm_List_Item *)sd->focused_item))
1091 return; 1092 return;
1093 evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
1094 evas_object_geometry_get(sd->hit_rect, &sx, &sy, &sw, &sh);
1095 if ((x < sx) || (y < sy)|| ((x + w) > (sx + sw)) || ((y + h) > (sy + sh)))
1096 {
1097 if (!_elm_config->focus_auto_scroll_bring_in_enable)
1098 elm_list_item_show((Elm_Object_Item *)it);
1099 else
1100 elm_list_item_bring_in((Elm_Object_Item *)it);
1101 }
1092 sd->focused_item = (Elm_Object_Item *)it; 1102 sd->focused_item = (Elm_Object_Item *)it;
1093 if (elm_widget_focus_highlight_enabled_get(WIDGET(it))) 1103 if (elm_widget_focus_highlight_enabled_get(WIDGET(it)))
1094 { 1104 {
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 32b08f115..dc3b58935 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -601,6 +601,12 @@ _elm_toolbar_item_focused(Elm_Toolbar_Item *it)
601 return; 601 return;
602 602
603 sd->focused_item = it; 603 sd->focused_item = it;
604 if (!_elm_config->focus_auto_scroll_bring_in_enable)
605 elm_toolbar_item_show((Elm_Object_Item *)it,
606 ELM_TOOLBAR_ITEM_SCROLLTO_IN);
607 else
608 elm_toolbar_item_bring_in((Elm_Object_Item *)it,
609 ELM_TOOLBAR_ITEM_SCROLLTO_IN);
604 if (elm_widget_focus_highlight_enabled_get(obj)) 610 if (elm_widget_focus_highlight_enabled_get(obj))
605 { 611 {
606 edje_object_signal_emit 612 edje_object_signal_emit