interface_scrollable: Improve gravity_set api to support pan changing 10/124410/1
authorWonki Kim <wonki_.kim@samsung.com>
Wed, 15 Feb 2017 12:01:46 +0000 (21:01 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Tue, 11 Apr 2017 08:26:09 +0000 (17:26 +0900)
commita360d447ceb37bc030ec6c9b0d9ca73d5f9b532c
tree0921dd5a91291158cb7db0d1f2b8b122498f8b4e
parent82b2d506cc65882c6ef8ddf22c2e294ca5cee77c
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

Differential Revision: https://phab.enlightenment.org/D4665

Change-Id: I0af8e737cae4a31f9aa2082b7a89c0d01392f5f3
Signed-off-by: Wonki Kim <wonki_.kim@samsung.com>
src/lib/elm_interface_scrollable.c