forked from enlightenment/efl
elementary/button,label,bg - i have no idea but elm_layout_theme_set() should be called in smart_add().
this fixes the hoversel. SVN revision: 84275
This commit is contained in:
parent
6941e2aca4
commit
97c6cc2d81
|
@ -100,20 +100,19 @@ static void
|
|||
_elm_bg_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
||||
{
|
||||
Elm_Bg_Smart_Data *priv = _pd;
|
||||
Evas_Object *parent;
|
||||
|
||||
eo_do_super(obj, evas_obj_smart_add());
|
||||
|
||||
Evas_Object *parent = eo_parent_get(obj);
|
||||
if (!elm_widget_sub_object_add(parent, obj))
|
||||
ERR("could not add %p as sub object of %p", obj, parent);
|
||||
|
||||
elm_widget_can_focus_set(obj, EINA_FALSE);
|
||||
|
||||
priv->option = ELM_BG_OPTION_SCALE;
|
||||
|
||||
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _on_resize, obj);
|
||||
|
||||
parent = eo_parent_get(obj);
|
||||
if (!elm_widget_sub_object_add(parent, obj))
|
||||
ERR("could not add %p as sub object of %p", obj, parent);
|
||||
|
||||
elm_layout_theme_set(obj, "bg", "base", elm_widget_style_get(obj));
|
||||
}
|
||||
|
||||
|
@ -138,7 +137,6 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
|
|||
{
|
||||
eo_do_super(obj, eo_constructor());
|
||||
eo_do(obj, evas_obj_type_set(MY_CLASS_NAME));
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -117,6 +117,7 @@ _elm_button_smart_theme(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
|||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
if (ret) *ret = EINA_FALSE;
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
|
||||
eo_do_super(obj, elm_wdg_theme(&int_ret));
|
||||
if (!int_ret) return;
|
||||
_icon_signal_emit(obj);
|
||||
|
@ -293,6 +294,10 @@ _elm_button_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
|||
|
||||
eo_do_super(obj, evas_obj_smart_add());
|
||||
|
||||
Evas_Object *parent = eo_parent_get(obj);
|
||||
if (!elm_widget_sub_object_add(parent, obj))
|
||||
ERR("could not add %p as sub object of %p", obj, parent);
|
||||
|
||||
edje_object_signal_callback_add
|
||||
(wd->resize_obj, "elm,action,click", "",
|
||||
_on_clicked_signal, obj);
|
||||
|
@ -312,6 +317,7 @@ _elm_button_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
|||
(_elm_access_object_get(obj), ELM_ACCESS_STATE, _access_state_cb, priv);
|
||||
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
elm_layout_theme_set(obj, "button", "base", elm_widget_style_get(obj));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -344,12 +350,6 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
|
|||
eo_do(obj,
|
||||
evas_obj_type_set(MY_CLASS_NAME),
|
||||
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
|
||||
|
||||
Evas_Object *parent = eo_parent_get(obj);
|
||||
if (!elm_widget_sub_object_add(parent, obj))
|
||||
ERR("could not add %p as sub object of %p", obj, parent);
|
||||
|
||||
elm_layout_theme_set(obj, "button", "base", elm_widget_style_get(obj));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -378,6 +378,10 @@ _elm_label_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
|||
|
||||
eo_do_super(obj, evas_obj_smart_add());
|
||||
|
||||
Evas_Object *parent = eo_parent_get(obj);
|
||||
if (!elm_widget_sub_object_add(parent, obj))
|
||||
ERR("could not add %p as sub object of %p", obj, parent);
|
||||
|
||||
priv->linewrap = ELM_WRAP_NONE;
|
||||
priv->wrap_w = -1;
|
||||
priv->slide_duration = 10;
|
||||
|
@ -400,6 +404,10 @@ _elm_label_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
|||
(_elm_access_object_get(obj), ELM_ACCESS_TYPE, E_("Label"));
|
||||
_elm_access_callback_set
|
||||
(_elm_access_object_get(obj), ELM_ACCESS_INFO, _access_info_cb, NULL);
|
||||
|
||||
elm_layout_theme_set(obj, "label", "base", elm_widget_style_get(obj));
|
||||
elm_layout_text_set(obj, NULL, "<br>");
|
||||
elm_layout_sizing_eval(obj);
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
|
@ -418,14 +426,6 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
|
|||
eo_do(obj,
|
||||
evas_obj_type_set(MY_CLASS_NAME),
|
||||
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
|
||||
|
||||
Evas_Object *parent = eo_parent_get(obj);
|
||||
if (!elm_widget_sub_object_add(parent, obj))
|
||||
ERR("could not add %p as sub object of %p", obj, parent);
|
||||
|
||||
elm_layout_theme_set(obj, "label", "base", elm_widget_style_get(obj));
|
||||
elm_layout_text_set(obj, NULL, "<br>");
|
||||
elm_layout_sizing_eval(obj);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
Loading…
Reference in New Issue