Page MenuHomePhabricator

elm_scoller : page show API bug on loop_set situation
Open, NormalPublic

Description

Called elm_scroller_page_show(), but page will set to incurrect page.

  1. Makes Page scroll, and loop_set enable.
  2. Sets elm_scroller_page_relative_set(scr, 0, (1.0 / 3))
  3. Run App
  4. Call elm_scroller_page_show(scr, 0, last_index - 1)

Page Scroll show (last_index - 2) page.
When I call elm_scroller_page_show(scr, 0, last_index - 1) again, works normally.

I attached sample App. (

)
Test Plan:

  1. make
  2. ./test1
  3. input '3' to below entry
  4. click button (Bug state)
  5. click button again (Work normally)
step 2 state
step 4 state
step 5 state
z-wony created this task.Sep 29 2016, 8:06 AM

When I use elm_scroller_page_size_set() than elm_scroller_page_relative_set(sc, 0.0, 1.0/3), issue is same.

akanad added a comment.Oct 4 2016, 9:23 PM

I just analyzed this issue.

If there are offsets on the swallow.content of scroller,
size of pan inside scroller will be smaller by the value of sum of the offsets between rel1 and rel2. (it's 3px each axis in default theme)

in this case, edje_object_part_drag_value_set which is called inside _elm_interface_scrollable_content_pos_set,
will invoke _elm_scroll_scroll_bar_read_and_update at next loop.

and then, _elm_scroll_scroll_bar_read_and_update will update position of the scroller after reading drag bar value which is calculated over value related scroller geometry(offset not included),

I guess there might be many solutions for it.

sol 1. inform policy

=> e.g) user must set the size of the scroller by a value of multiple of page_size plus sum of offsets of swallow.content.

sol 2. get rid of offsets in the swallow part to match geometry between pan and scroller.
sol 3. ignore updating pos _elm_scroll_scroll_bar_read_and_update in some case.

=> it may cause unexpected behavior of scroll bar.

sol 4. make basis of calculation consistently.

I couldn't decide what should I do.

stefan_schmidt triaged this task as Normal priority.Feb 10 2017, 6:45 AM
zmike edited projects, added Restricted Project; removed efl.Jun 11 2018, 6:54 AM
q66 edited projects, added efl: widgets; removed Restricted Project.Jun 11 2018, 7:34 AM