From: Jae Hwan Kim <jae.hwan.kim@samsung.com>
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 31 Jan 2011 10:00:49 +0000 (10:00 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 31 Jan 2011 10:00:49 +0000 (10:00 +0000)
commit395d22766fb270ce28b9c36f7637212308bcfca7
tree979401fce1655a6f266c5e024c53c758bbf12c84
parent19fdef76ffe35b3c46a717d745f2919f594ac13e
From: Jae Hwan Kim <jae.hwan.kim@samsung.com>
Subject: [E-devel] [Patch] els_scroller -
elm_smart_scroller_child_region_show

I have some issue in scroller.
Sometimes the scroller move to wrong region when the child get first
focus.
It use "scroller -> layout -> button".
So I checked the code and found a suspected thing in
elm_smart_scroller_child_region_show.
Please refer following pictures.

In the pictures, the rect which be written "x, y, w, h" is the area
which be made with the parameters of
"elm_smart_scroller_child_region_show".
The rect which be written "Pan" is the pan area of the scroller.

If the situation is 1) or 2) and the function is called, the result
have to be 7).
In case of 3) or 4), it have to be 8).
In case of 5) or 6), it have to remain as it is.
Is it right??

But if the situation is 6) and the function is called, the result will
be 7) in current code.
I think it is wrong.
I attached patch code. please find it below the pictures.

1)
    ---------------
    |                    |
    |   x, y, w, h   |
    |                    |
    ---------------
---------------------
|                             |
|                             |
|                             |
|            Pan           |
|                             |
|                             |
|                             |
---------------------

2)
    ---------------
    |                    |
    |   x, y, w, h   |
---------------------
|   |                    |   |
|   ---------------   |
|                             |
|            Pan           |
|                             |
|                             |
|                             |
---------------------

3)
---------------------
|                             |
|                             |
|                             |
|            Pan           |
|                             |
|   ---------------   |
|   |                   |    |
---------------------
    |   x, y, w, h   |
    |                    |
    ---------------

4)
---------------------
|                             |
|                             |
|                             |
|            Pan           |
|                             |
|                             |
|                             |
---------------------
    ---------------
    |                    |
    |   x, y, w, h   |
    |                    |
    ---------------

5)
---------------------
|                             |
|   ---------------   |
|   |                    |   |
|   |   x, y, w, h   |   |
|   |                    |   |
|   ---------------   |
|            Pan           |
---------------------

6)
    ---------------
    |                    |
---------------------     <---Pan
|   |                   |    |
|   |   x, y, w, h  |    |
|   |                   |    |
---------------------
    |                    |
    ---------------

7)
---------------------
|   |                    |   |
|   |   x, y, w, h   |   |
|   |                    |   |
|   ---------------   |
|                             |
|            Pan           |
|                             |
---------------------

8)
---------------------
|                             |
|            Pan           |
|                             |
|   ---------------   |
|   |                    |   |
|   |   x, y, w, h   |   |
|   |                    |   |
---------------------

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@56579 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
src/lib/els_scroller.c