forked from enlightenment/efl
efl_ui_spin_button: Replace legacy widgets to efl ui widgets.
Summary: elm_button -> efl_ui_button class. elm_entry will be changed after filter feature added. Reviewers: Jaehyun_Cho, jpeg, woohyun Reviewed By: Jaehyun_Cho Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5555
This commit is contained in:
parent
5e4abdb873
commit
1588b8be0a
|
@ -352,6 +352,9 @@ _toggle_entry(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
if (!sd->ent)
|
if (!sd->ent)
|
||||||
{
|
{
|
||||||
|
//FIXME: elm_entry will be changed to efl_ui_text after
|
||||||
|
// filter feature implemented.
|
||||||
|
// (Current efl_ui_text has missed filter feature.)
|
||||||
sd->ent = elm_entry_add(obj);
|
sd->ent = elm_entry_add(obj);
|
||||||
Eina_Strbuf *buf = eina_strbuf_new();
|
Eina_Strbuf *buf = eina_strbuf_new();
|
||||||
eina_strbuf_append_printf(buf, "spinner/%s", elm_widget_style_get(obj));
|
eina_strbuf_append_printf(buf, "spinner/%s", elm_widget_style_get(obj));
|
||||||
|
@ -771,33 +774,23 @@ _efl_ui_spin_button_efl_object_finalize(Eo *obj, Efl_Ui_Spin_Button_Data *sd)
|
||||||
elm_widget_style_get(obj)))
|
elm_widget_style_get(obj)))
|
||||||
CRI("Failed to set layout!");
|
CRI("Failed to set layout!");
|
||||||
|
|
||||||
sd->inc_button = elm_button_add(obj);
|
sd->inc_button = efl_add(EFL_UI_BUTTON_CLASS, obj,
|
||||||
elm_object_style_set(sd->inc_button, "spinner/increase/default");
|
efl_ui_widget_style_set(efl_added, "spinner/increase/default"),
|
||||||
|
efl_event_callback_array_add(efl_added, _inc_dec_button_cb(), obj),
|
||||||
|
efl_content_set(efl_part(obj, "elm.swallow.inc_button"), efl_added));
|
||||||
|
|
||||||
efl_event_callback_array_add(sd->inc_button, _inc_dec_button_cb(), obj);
|
sd->text_button = efl_add(EFL_UI_BUTTON_CLASS, obj,
|
||||||
|
efl_ui_widget_style_set(efl_added, "spinner/default"),
|
||||||
|
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
|
||||||
|
_text_button_clicked_cb, obj),
|
||||||
|
efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED,
|
||||||
|
_text_button_focus_changed_cb, obj),
|
||||||
|
efl_content_set(efl_part(obj, "elm.swallow.text_button"), efl_added));
|
||||||
|
|
||||||
elm_layout_content_set(obj, "elm.swallow.inc_button", sd->inc_button);
|
sd->dec_button = efl_add(EFL_UI_BUTTON_CLASS, obj,
|
||||||
elm_widget_sub_object_add(obj, sd->inc_button);
|
efl_ui_widget_style_set(efl_added, "spinner/decrease/default"),
|
||||||
|
efl_event_callback_array_add(efl_added, _inc_dec_button_cb(), obj),
|
||||||
sd->text_button = elm_button_add(obj);
|
efl_content_set(efl_part(obj, "elm.swallow.dec_button"), efl_added));
|
||||||
elm_object_style_set(sd->text_button, "spinner/default");
|
|
||||||
|
|
||||||
efl_event_callback_add(sd->text_button, EFL_UI_EVENT_CLICKED,
|
|
||||||
_text_button_clicked_cb, obj);
|
|
||||||
efl_event_callback_add(sd->text_button,
|
|
||||||
EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED,
|
|
||||||
_text_button_focus_changed_cb, obj);
|
|
||||||
|
|
||||||
elm_layout_content_set(obj, "elm.swallow.text_button", sd->text_button);
|
|
||||||
elm_widget_sub_object_add(obj, sd->text_button);
|
|
||||||
|
|
||||||
sd->dec_button = elm_button_add(obj);
|
|
||||||
elm_object_style_set(sd->dec_button, "spinner/decrease/default");
|
|
||||||
|
|
||||||
efl_event_callback_array_add(sd->dec_button, _inc_dec_button_cb(), obj);
|
|
||||||
|
|
||||||
elm_layout_content_set(obj, "elm.swallow.dec_button", sd->dec_button);
|
|
||||||
elm_widget_sub_object_add(obj, sd->dec_button);
|
|
||||||
|
|
||||||
{
|
{
|
||||||
Eina_List *items = NULL;
|
Eina_List *items = NULL;
|
||||||
|
|
Loading…
Reference in New Issue