Page MenuHomePhabricator

interface_scrollable: Improve gravity_set api to support pan changing
ClosedPublic

Authored by akanad on Feb 15 2017, 3:58 AM.

Details

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)

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
akanad created this revision.Feb 15 2017, 3:58 AM
akanad updated this revision to Diff 10756.Feb 15 2017, 4:28 AM

Initialize related variables by proper values

cedric requested changes to this revision.Feb 15 2017, 4:26 PM

Could you try to describe a bit more the problem ? I can't really understand what I should be looking at.

This revision now requires changes to proceed.Feb 15 2017, 4:26 PM
akanad added a comment.EditedFeb 15 2017, 4:44 PM

when you resize window in many ways by dragging, you can find the position of pan is getting different from original one.

  1. Append 20 items and set gravity 1.0 on scroller3 sample in elementary_test

  1. Resize larger than original, it looks fine

  1. Resize smaller than original, bar is getting changed.

  1. Even if window is resized by original size, position of bar has difference from original one.

Append new reviewer

jpeg accepted this revision.Feb 19 2017, 6:36 PM
Closed by commit rEFL80e3c643d869: interface_scrollable: Improve gravity_set api to support pan changing (authored by WhiskyKiloSq, committed by Jean-Philippe Andre <jp.andre@samsung.com>). · Explain WhyFeb 19 2017, 6:37 PM
This revision was automatically updated to reflect the committed changes.
jpeg added a comment.Feb 19 2017, 6:38 PM
This comment was removed by jpeg.