interface_scrollable: Improve gravity_set api to support pan changing
authorWonki Kim <wonki_.kim@samsung.com>
Mon, 20 Feb 2017 02:31:12 +0000 (11:31 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 20 Feb 2017 02:38:02 +0000 (11:38 +0900)
commit80e3c643d8693a12b5650222c9181e71819fb8ef
treef98bf202124202f5955253b67d711ac1d7459925
parent75908799dc0e79bbee72be3b23d51cd6348d8467
interface_scrollable: Improve gravity_set api to support pan changing

Summary:
When you set gravity 1 on scroller, scroller sticks to the bottom
even content is changed.
however, scroller don't work like above, if size of pan is changed.

this commit uses pan_pos_max rather than w/h of content_info
because pan_pos_max is related with both content_size and pan size.

gravity_set will work properly even if both size of content and pan are
changed simultaneously.

Test Plan:
1. Select 'scroll3' in the elementary_test
2. Append enough items so that scroll bar appears (about 30 items)
3. Go to the bottom and Set gravity 1.0
4. Check that scroller sticks to the bottom once you append another item
   (it works)
5. Check that scroller sticks to to bottom once you resize window(pan)
   (it doesn't work without this patch)

Reviewers: eagleeye, jpeg, cedric, woohyun, z-wony, herdsman

Differential Revision: https://phab.enlightenment.org/D4665
src/lib/elementary/elm_interface_scrollable.c