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)
downloadelementary-4e7b54066a45178abaa1b1c2a76c82e09c9392ac.tar.gz
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)
(elm_widget_item_disabled_get(it)))
return;
+ if (!_elm_config->focus_auto_scroll_bring_in_enable)
+ elm_gengrid_item_show
+ ((Elm_Object_Item *)it, ELM_GENGRID_ITEM_SCROLLTO_IN);
+ else
+ elm_gengrid_item_bring_in
+ ((Elm_Object_Item *)it, ELM_GENGRID_ITEM_SCROLLTO_IN);
sd->focused_item = (Elm_Object_Item *)it;
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)
(elm_widget_item_disabled_get(it)))
return;
+ if (!_elm_config->focus_auto_scroll_bring_in_enable)
+ elm_genlist_item_show((Elm_Object_Item *)it,
+ ELM_GENLIST_ITEM_SCROLLTO_IN);
+ else
+ elm_genlist_item_bring_in((Elm_Object_Item *)it,
+ ELM_GENLIST_ITEM_SCROLLTO_IN);
sd->focused_item = (Elm_Object_Item *)it;
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
_elm_list_item_focused(Elm_List_Item *it)
{
ELM_LIST_DATA_GET(WIDGET(it), sd);
+ Evas_Coord x, y, w, h, sx, sy, sw, sh;
const char *focus_raise;
if ((!sd) || (sd->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) ||
(it == (Elm_List_Item *)sd->focused_item))
return;
+ evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
+ evas_object_geometry_get(sd->hit_rect, &sx, &sy, &sw, &sh);
+ if ((x < sx) || (y < sy)|| ((x + w) > (sx + sw)) || ((y + h) > (sy + sh)))
+ {
+ if (!_elm_config->focus_auto_scroll_bring_in_enable)
+ elm_list_item_show((Elm_Object_Item *)it);
+ else
+ elm_list_item_bring_in((Elm_Object_Item *)it);
+ }
sd->focused_item = (Elm_Object_Item *)it;
if (elm_widget_focus_highlight_enabled_get(WIDGET(it)))
{
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)
return;
sd->focused_item = it;
+ if (!_elm_config->focus_auto_scroll_bring_in_enable)
+ elm_toolbar_item_show((Elm_Object_Item *)it,
+ ELM_TOOLBAR_ITEM_SCROLLTO_IN);
+ else
+ elm_toolbar_item_bring_in((Elm_Object_Item *)it,
+ ELM_TOOLBAR_ITEM_SCROLLTO_IN);
if (elm_widget_focus_highlight_enabled_get(obj))
{
edje_object_signal_emit