Commit Graph

35 Commits

Author SHA1 Message Date
junsu choi d1e5bd2727 Revert "scroller : fix mirrored contents_pos_set call"
Summary:
This reverts commit de313d6296.

Because x-coordination mirroring is called properly from wanted_regison_set.
There was a problem in scroller init process.
Before edje_obj was initialize in elm_interface_scrollable_objects_set, mirrored_set was being called.
So Move mirrored_set after elm_interface_scrollable_objects_set
it can fix this issue(https://phab.enlightenment.org/D4944)

Reviewers: raster, woohyun, SanghyeonLee, akanad, eagleeye, cedric, singh.amitesh, eunue

Subscribers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D4945
2017-06-07 15:17:45 +09:00
junsu choi de313d6296 scroller : fix mirrored contents_pos_set call
Summary:
Fixes that a scroller can not be moved normally even if it is changed to mirrored.
In elm_scroller, _mirrored_set is called when sizing_eval is called. because
When content size is changed, it should be scrolled based on mirrored coordinates.
Also In elm_interface_scrollable,
elm_interface_scrollable_content_pos_set of _elm_scrollable_mirrored_set
to be called regardless of mirrored state.

Test Plan: scroller test on elementary_test.

Reviewers: raster, woohyun, SanghyeonLee, akanad, eagleeye, cedric, singh.amitesh, eunue

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 14:19:34 -07:00
Jean-Philippe Andre 55b529cebc evas/elm: Make group_add/group_del internal functions
This hides those two legacy functions from the EO API.
2017-05-19 14:07:00 +09:00
Marcel Hollerbach fb6c37f16f elementary: introduce helper functions for the redirects 2017-04-20 14:38:59 +02:00
Marcel Hollerbach 7994fa3f68 elm_interface_scrollable: fix bringing in of items 2017-04-20 14:38:58 +02:00
Marcel Hollerbach 44e40c7c5e elm_interface_scrollable: use the submanager to register the children
this adds the registered elements at the broder of the scrollable to the
parents manager. scroller and gengrid works for registering
2017-04-20 14:38:58 +02:00
Jean-Philippe Andre a5e019b468 scroller: Fix issues with looping and paging
Prerequisites:
  Disable scroll animation (in elementary_config)

Test case:
  elementary_test -to Scroller

1. Scroll with the mouse wheel. Scrolling will not loop or anything.
2. Enable loop in Y, scroll to the top and to the bottom, verify
   that scrolling loops fine and shows the last and first page in
   full.
3. Enable page snapping, and repeat 2.

FIXME: Page snapping doesn't do much if you use thumbscroll or
       drag the scrollbars.

FIXME: In the test case, Y +/- 1 is useless as the scroller snaps
       to the pages even without snapping enabled.

@fix
2017-04-12 17:07:48 +09:00
Jean-Philippe Andre 0cd610af20 scroller: Fix freeze after dragging bars
The freeze property is a set() only but could internally
be reset to false, after dragging a vertical or horizontal slider.

Test scenario:
  elementary_test -to scroller

Click Freeze, test the mouse wheel (can't do anything), drag a
scroller side bar, test the mouse wheel again.

Before this patch, the scroller would scroll. After the patch, the
scroller remains fixed, respecting the value of freeze.

FIXME: It is possible that the proper fix would be to disable
       bars drag during freeze, but that is not the case currently.

NOTE: freeze, hold, movement_block, lock_x/y have very similar
      meanings. The doc really needs clarification here, and some
      property might be removed. Also, freeze and hold have no
      getter, only a setter. drag_lock_x/y is part of elm_widget,
      and not specific to scrollers.
2017-04-12 15:18:24 +09:00
Jean-Philippe Andre 59cf7c7ab7 scroller: Fix CRI if scroll animation is disabled
If the scroll animation is disabled, we ended up with an
immediate call from inside a post-event callback to modify
the canvas geometry which led to feeding events. Since
99d21f6d9c and 54e5841b2f it is basically forbidden
to modify the canvas or feed events from the post-event cb.
This is because feeding events from inside the post-event
callback can break the logical order of operations between
post-event cb and event cb.

Note: This also implements no-animation scrolling for page
scroll, in case scroll animation is disabled (unifying the
code did that).

Fixes T5289 (abort inside E)
2017-04-12 14:54:15 +09:00
Jean-Philippe Andre bc4f803d37 scroller: Fix wheel scroll with imbricated H+V scrollers
Test scenario:
 elementary_test -to "Scroller 2"

Use the mouse wheel to scroll inside the horizontal scroller
(the one with many "...Horizontal scrolling..." buttons). This
scroller should scroll horizontally. When reaching the end of
this scroller, the main vertical scroller should take over
and scroll vertically, but only after a 0.5s timeout has passed.

Before this patch, you could wait forever and scrolling inside
the horizontal scroller would never trigger a scroll in the main
vertical scroller, despite reaching the end point.

In 1.18 both the main and the horizontal scrollers scroll
simultaneously. The imbricated vertical scrollers seem to work
as designed, but not H inside V.

@fix
2017-04-12 14:32:33 +09:00
Jean-Philippe Andre bc31a47fd9 elm: Restore ABI compatibility (elm_pan_gravity)
elm_pan_gravity_{set,get} are functions that were generated as
legacy APIs (in other words EAPI), but were never actually exposed
to applications as they were protected behind EFL_EO_API_SUPPORT
(see elm_interfaces.h).

This patch restores the ABI compatibility with elementary 1.18.
2017-02-23 15:43:56 +09:00
Wonki Kim 80e3c643d8 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
2017-02-20 11:38:02 +09:00
Wonki Kim fbad285eca interface_scrollable: Unify basis of calculation of page_get logic
Summary:
If rtl mode is set, current_page_get api should return reversed page number.
To do that, make x position x-axis reversed before page calculating.

Also bring_in and page_show should show the reversed page in rtl mode.
This patch modify the functions to support that.

Lastly, scroller should be scrolling based on the right edge of the page.

This patch is a combination of the patches(D4559,D4560)

Test Plan:
1. Run scroller test on elementary_test
2. Turn ui mirrored mode on
3. Manipulate scroller in various ways
    - It should scroll proper position when you click next or prev btn.

Reviewers: woohyun, taxi2se, z-wony, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4558
2017-01-16 14:20:04 +09:00
Hosang Kim 2b3bee1301 scrollable_interface: fixed logic for calcualting position to scroll.
Summary:
When width of parameter(w) is bigger than or equal to scroller's width(pw),
scrollable object must be scrolled to x position.

Test Plan: elementary_test -> focus 4

Reviewers: woohyun, SanghyeonLee, Hermet, cedric, jpeg, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4491
2016-12-16 15:26:00 -08:00
soohye e0e0c892d2 scrollable_interface: fixed last_page_get() API
Summary: ceiling the vaule of content size divided by page size

Reviewers: cedric, jpeg, Hermet

Reviewed By: Hermet

Subscribers: minkyu, sju27, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4447
2016-12-06 13:34:53 +09:00
Mike Blumenkrantz f116310757 elm scrollable: return correct values from post event callbacks
post event callbacks must return 0 to stop processing when an event is
consumed, and 1 when processing should continue. this is the only place in
all of efl which used this functionality, and it did so incorrectly.

@fix

ref 248b6beeee
ref D2393
2016-11-03 11:42:26 -04:00
Jean-Philippe Andre fb797611ed scroller: Adjust rare case when content fits but bars are visible
This was simply annoying me. A scroller packed inside a box 150x150
should have enough space to hold an object of size 140x140. That's
a whole lot of 10 pixels margin!

This patch adds a special case code when the content "seems" to fit
inside the box but still one or both bars are visible. One problem
is that we can't know from the theme how much margin is used by a
scroller even when its bars are hidden. So we have to try to remove
them and then recalc to test.

This definitely adds quite a few more calculations if the state of
the scroll bars changes, but the result is way more pleasant :) This
should be limited to corner cases anyway (when the content size is
within 0 to ~20 pixels of the scroller size, depending on the theme
of course).

The test case is adjusted to show that same size content triggers
a show on the bars (because of theme margins). See CtxPopup test.
2016-10-27 10:02:56 +09:00
Jean-Philippe Andre 8a9f0bd603 evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
 - intercept
 - smart resize (do stuff), super, super, super
 - evas object resize

The new code is more like:
 - intercept
 - super, super, super, evas object resize
 - do stuff

But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 11b7cf6b72 evas/elm: Remove function group_move
This is an override of efl_gfx_position_set.
As for the other patches, I hope I didn't break anything.

A problem likely to happen is that the super call was inserted
too early or too late in the call flow. For instance:

  _myclass_position_set(obj, x, y) {
    position_set(super(obj), x, y);
    position_get(obj, &prevx, &prevy);
    do_something_with_delta_xy();
  }

The above code flow is obvisouly wrong, but may have crept in this
patch (such a bug sneaked in inside smart object, breaking
everything at first).
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 97c9fa64a4 evas/elm: Remove group_show and group_hide
These should be just overrides of Efl.Gfx.visible.set. Many
widgets were handling smart show() and hide() manually, which
means this patch is quite large.

Hopefully this doesn't break anything, obviously. But here are
some widgets known to be problematic, as the old code flow was
really strange (sometimes not calling the efl_super function):
 - window
 - notify
2016-10-12 11:25:56 +09:00
Hosang Kim f148296ed1 scrollable_interface: fixed gravity_set() API.
Summary: elm_scroller_gravity_set()  API is not working.

Test Plan: elementary_test -> scroller3

Reviewers: jaehwan, SanghyeonLee, Hermet, jypark, raster, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4252
2016-09-22 11:06:29 +09:00
Tom Hacohen d5e321466e Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Carsten Haitzler 7a70d41541 elm scroller accel was broken by default confgis setting it to 0. fix
now set default wheel scroll accel to 7 as epr the confgi upgrade code
and also improve the acceleration to "rely on itself" and feedback
loop. this is so much better now i can scroll through things in a
whisk with the wheel.

fixes T4263

@fix
2016-08-02 17:32:19 +09:00
Jean-Philippe Andre b3293408a4 scrollable: Avoid useless connect to animator
If scrolling Y no need to register X animators. And vice
versa. It's a minor optimization.
2016-08-01 10:29:24 +09:00
Jean-Philippe Andre 7bf8da2baa evas: Rename Evas.Object to Efl.Canvas.Object
One step closer to make the EO inheritance tree look like
it's all Efl.
2016-06-21 14:35:19 +09:00
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Jean-Philippe Andre 52f9220b3f Evas: Rename smart object into Efl.Canvas.Group 2016-06-17 19:32:43 +09:00
Jean-Philippe Andre 42b63f5507 Evas: Add smart_ prefix to all smart functions (eo)
This is a first step at separating legacy smart
object features away from standard efl interfaces.
2016-06-17 19:25:48 +09:00
Jean-Philippe Andre 9a052a740d Evas: Move smart_callbacks_descriptions to legacy 2016-06-17 19:25:47 +09:00
Cedric Bail 45bc4f30eb efl: change name of animator,tick event in C. 2016-05-18 02:20:13 -07:00
Youngbok Shin 9e2b06cf98 elementary interface/scrollable: remove duplicated function calls for bars
Summary:
 *_visibility_apply() functions are called from each *_visibility_adjust()
function. And it is also called from _elm_scroll_scroll_bar_size_adjust().
So, calling *_visibility_apply() functions after calling
_elm_scroll_scroll_bar_size_adjust() is unnecessary.
@fix

Test Plan: N/A

Reviewers: raster, jaehwan, eagleeye, woohyun, cedric

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-26 14:54:39 -07:00
Cedric BAIL c2a1c49ab2 elementary: move all legacy files to their expected new location. 2016-03-23 13:24:41 -07:00