Commit Graph

8 Commits

Author SHA1 Message Date
Xavi Artigas e776f5f0d7 Efl.Ui.Format revamp
This class helps widgets which contain a numerical value and must display it,
like Progressbar (units label), Spin, Spin_Button, Slider (both units and popup
labels, in legacy), Tags (when in shrunk mode) or Calendar (year_month label).

Previously this was a mix of interface and mixin: widgets had to support setting a
formatting func, and the mixin offered support for formatting strings, by setting
an internal formatting func. On top of that, the spinner widget supported "special
values", a list of values that should be shown as certain strings instead.

This has now been simplified and unified:
Widgets including this mixin can use the formatted_value_get() method which accepts
an Eina_Value and returns a string. Thats's it.
The mixin adds three properties to the widget (format_values, format_func and
format_string) which users can use to tailor formatting. The widget does not need
to know which method has been used, it just retrieves the resulting string.
This removes a lot of duplicated widget code, and adds functionality which was
missing before. For example, all widgets support passing a list of values now.

Widgets must implement the apply_formatted_value() method so they are notified
of changes in the format and they can redraw anything they need.

Tests have been added to the Elementary Spec suite for all cases.

Legacy widgets behavior has not been modified, although a few needed some code
changes.
2019-07-04 19:38:20 +02:00
Woochan Lee 939690a8a9 Revert Efl.Ui.Multibuttonentry to create new one.
Summary:
Revert e02b2f04c2945ad60fab5612af1e02b0838b7ff5.

I couldnt make a revert commit for many commit has been related with above commit.

I will create a new MBE eo class ASAP. (https://phab.enlightenment.org/T5358)

Reviewers: cedric, woohyun, Jaehyun_Cho, SanghyeonLee, herb

Reviewed By: Jaehyun_Cho

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5954
2018-04-19 22:22:01 +09:00
Woochan Lee 6c3bc915df elm: rename elm_multibuttonentry to Efl.Ui.Multibuttonentry
Summary: @ref T5358

Reviewers: woohyun, jpeg, cedric, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: Jaehyun, bu5hm4n, cedric, jpeg

Maniphest Tasks: T5358

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

JP's note:
MBE currently has quite a few issues, probably related to focus
handling. This needs to be fixed.
2017-10-24 16:20:09 +09:00
Jean-Philippe Andre 71824e1fe0 mbe: Fix infinite recursion on focus change
Ref D4882
2017-08-31 14:14:50 +09:00
Woochan Lee 5eb001dd35 multibuttonentry: Separate selected item and focused item logic.
Summary:
When user set a selected item on MBE creation time.
The internal logic will be broke.
So we need to separate logic them.

@fix

Test Plan:
Calling elm_multibuttonentry_item_selected_set() before MBE got a focus. in elementary_test.

Reviewers: cedric, jpeg, woohyun

Subscribers: bu5hm4n, marcelhollerbach, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4882
2017-08-31 14:01:05 +09:00
JEONGHYUN YUN 3147066865 multibuttonentry : fix box indicated item correctly in item_insert_before and item_insert_after
Summary:
If user added item with item_insert_before and item_insert_after, item was not displayed.
For this reason, fixed box indicated item correctly from reference->button to VIEW(reference).
Additionally, remove the unused variable button in _Multibuttonentry_Item struct.

Reviewers: woohyun, CHAN, cedric, jpeg

Reviewed By: CHAN

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4708
2017-03-09 16:11:34 +09: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
Cedric BAIL c2a1c49ab2 elementary: move all legacy files to their expected new location. 2016-03-23 13:24:41 -07:00