Commit Graph

4 Commits

Author SHA1 Message Date
Shinwoo Kim a3a07f6e83 Efl.Ui.Format: fix regressions
(1) Following commit did not care of efl_ui_format_string_get(set) of
elm_slider_part_indicator_eo.c

   e776f5f Efl.Ui.Format revamp

Even though you call elm_slider_indicator_format_set with "%1.0f",
elm_slider_indicator_format_get returns NULL.

(2) The commit does not initialize format variables
   - elm_slider_indicator_format_get
   - elm_slider_unit_format_get
   - elm_progressbar_unit_format_get

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9276
2019-07-11 13:19:54 +02:00
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
Mike Blumenkrantz 50205916c5 elm_slider_part_indicator: remove eo type usage from legacy functions
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8227
2019-03-07 14:17:05 -08:00
Mike Blumenkrantz 824e1b8109 elm_slider*: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8199
2019-03-07 14:16:20 -08:00