forked from enlightenment/efl
elm_radio: enable state change when radio is disabled
Summary: Currently, radio is set EINA_FALSE when radio is disabled. This causes unexpected behavior when the radio is selected and get disabled. Using elm_radio_value_get() API will return the value of disabled radio. This is not consistent with setting EINA_FALSE when radio is disabled. Thus, disabled radio should also have selected and unselected states. Reviewers: woohyun, smohanty, Hermet, cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D2880 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
4674aa3a7c
commit
5dc84fb1c7
|
@ -50,7 +50,7 @@ _state_set(Evas_Object *obj, Eina_Bool state)
|
|||
{
|
||||
ELM_RADIO_DATA_GET(obj, sd);
|
||||
|
||||
if ((state != sd->state) && (!elm_widget_disabled_get(obj)))
|
||||
if (state != sd->state)
|
||||
{
|
||||
sd->state = state;
|
||||
if (sd->state)
|
||||
|
@ -199,7 +199,7 @@ _elm_radio_elm_widget_theme_apply(Eo *obj, Elm_Radio_Data *sd)
|
|||
if (sd->state) elm_layout_signal_emit(obj, "elm,state,radio,on", "elm");
|
||||
else elm_layout_signal_emit(obj, "elm,state,radio,off", "elm");
|
||||
|
||||
if (elm_widget_disabled_get(obj) && sd->state) _state_set(obj, EINA_FALSE);
|
||||
if (sd->state) _state_set(obj, EINA_FALSE);
|
||||
|
||||
edje_object_message_signal_process(wd->resize_obj);
|
||||
|
||||
|
@ -220,8 +220,6 @@ _elm_radio_elm_widget_disable(Eo *obj, Elm_Radio_Data *sd)
|
|||
eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_disable());
|
||||
if (!int_ret) return EINA_FALSE;
|
||||
|
||||
if (elm_widget_disabled_get(obj) && sd->state) _state_set(obj, EINA_FALSE);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue