Commit Graph

8 Commits

Author SHA1 Message Date
Xavi Artigas dc9750ae1c doxygen: remove duplicated sections
Unified widgets simply copied elm's headers, duplicating doxygen sections.
2020-02-28 11:44:19 +01: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
Woochanlee a1478261b5 efl_ui_format: remove supporting default TM format in interface.
Summary:
efl_ui_format printed ERR log in calendar use case.

calendar only accept format as "B,b,h,m,y,Y"

But it doesn't cover that and not supporting TM type.

If there is other widget which one using format interface, It also has own accpeted format.

So i think it should impelment on widget side.

Test Plan: elementary_test -> efl_ui_calendar.

Reviewers: Hermet, singh.amitesh, Jaehyun, zmike, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6871
2018-11-20 10:23:28 +01:00
Woochan Lee 62a09f69a1 Efl.Ui.Calendar, elm_calendar: Code fixed to support auto repeat feature.
Summary:
1.  Why there is a edje signal callback in elm_calendar? and do we need to maintain?

 We used edje part like a button before (3 years ago?), So there is a callbacks to get edje signal.

 Im pretty sure it is not use anymore. but we need to maintain backward compatibility.

2. elm_calendar using using repeat feature in efl_ui_button for it. why did i change it to manual timer?

 We opend elm_calendar_interval_set() APIs. Support this API the manual timer is proper then using button's feature.

3. why scroll freeze? and why only elm_calendar does it?

 When the user long press calendar button area and then move the scroll will be activated. it can prevent that weird action.

 efl_ui_calendar using button's feature. i not sure scroll freeze is deserve to attached in button side as a feature or not.

 So i will consider more for this case.

4. Why efl_ui_calendar doesn't have year buttons (double spinner case)

 After interface work, we don't accept style change in the runtime. so that featrue will be supported as API.

 The year_button_set/get() property should be added. but i dont know is it really needed...

 If the app developer want use year inc/dec button for efl_ui_calendar. they can inherit the class and make it easily.

Test Plan:
View, Action, API test in the elementary-test sample App.

Ps. The issue of the calendar2 crash when it closed. It's not relative with this commit. its focus. i will look around.

Reviewers: Hermet, zmike, ManMower, segfaultxavi, devilhorns

Reviewed By: Hermet

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6626
2018-07-23 15:49:10 +09:00
Amitesh Singh 92b4ad824b Efl.Ui.Calendar: fix wrong define - again! 2017-11-22 17:14:07 +09:00
WooHyun Jung faf3fb50f9 efl_ui_calendar: fix wrong define 2017-11-22 16:54:30 +09:00
WooHyun Jung 02f179628c efl_ui_calendar: apply new format_cb 2017-10-31 11:21:15 +09:00
WooHyun Jung 9442f4687c efl_ui_calendar: create new efl_ui_calendar
Summary:
This calendar widget will support basic functionality of calendar.
I've separated this widget from elm_calendar since elm_calendar had
lots of unuseful things inside.

Reviewers: jpeg, singh.amitesh, cedric, CHAN, Jaehyun_Cho

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5346
2017-10-25 16:50:01 +09:00