diff options
author | Hosang Kim <hosang12.kim@samsung.com> | 2017-08-25 14:53:09 +0900 |
---|---|---|
committer | SangHyeon Jade Lee <dltkdgus1764@gmail.com> | 2017-08-25 14:53:09 +0900 |
commit | 4b74a4cd55ffe55ade7afaa5febbd7c5fb839a8e (patch) | |
tree | 0772c150b30d345166dce298a66299ada0bdfecf | |
parent | af1f4157f244f84169dc9c18785041278476f116 (diff) | |
download | efl-4b74a4cd55ffe55ade7afaa5febbd7c5fb839a8e.tar.gz |
scroller: fix getting content position.devs/woohyun/ui_scrollable
Summary:
Widgets that don't have content like as genlist, gengrid.
They don't have geometry of content also.
So position of pan will be used when calculating postion to scroll.
Test Plan:
tested in elementary_test and check working properly.
this may be the problem when extern pan set on scrollable interface.
Reviewers: SanghyeonLee, cedric, felipealmeida, larry, bu5hm4n
Reviewed By: SanghyeonLee
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D5127
-rw-r--r-- | src/lib/elementary/elm_interface_scrollable.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c index cd65b29da5..152de5f34d 100644 --- a/src/lib/elementary/elm_interface_scrollable.c +++ b/src/lib/elementary/elm_interface_scrollable.c @@ -4727,17 +4727,16 @@ EOLIAN static void _elm_interface_scrollable_efl_ui_focus_manager_focus_set(Eo *obj, Elm_Scrollable_Smart_Interface_Data *pd EINA_UNUSED, Efl_Ui_Focus_Object *focus) { Eina_Rectangle geom; - Eina_Rectangle obj_geom; + int pan_x, pan_y; efl_ui_focus_manager_focus_set(efl_super(obj, MY_SCROLLABLE_INTERFACE), focus); if (!focus) return; evas_object_geometry_get(focus, &geom.x, &geom.y, &geom.w, &geom.h); - evas_object_geometry_get(pd->content, &obj_geom.x, &obj_geom.y, &obj_geom.w, &obj_geom.h); - - geom.x = geom.x - obj_geom.x; - geom.y = geom.y - obj_geom.y; + elm_obj_pan_pos_get(pd->pan_obj, &pan_x, &pan_y); + geom.x = geom.x + pan_x; + geom.y = geom.y + pan_y; elm_interface_scrollable_region_bring_in(obj, geom.x, geom.y, geom.w, geom.h); } |