static void _theme_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; _elm_widget_mirrored_reload(obj); _mirrored_set(obj, elm_widget_mirrored_get(obj)); if (wd->horizontal) _elm_theme_object_set(obj, wd->sep, "separator", "horizontal", elm_widget_style_get(obj)); else _elm_theme_object_set(obj, wd->sep, "separator", "vertical", elm_widget_style_get(obj)); edje_object_scale_set(wd->sep, elm_widget_scale_get(obj) * _elm_config->scale); _sizing_eval(obj); }
EAPI Evas_Object * elm_separator_add(Evas_Object *parent) { Evas_Object *obj; Evas *e; Widget_Data *wd; ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL); ELM_SET_WIDTYPE(widtype, "separator"); wd->horizontal = EINA_FALSE; elm_widget_type_set(obj, "separator"); elm_widget_sub_object_add(parent, obj); elm_widget_data_set(obj, wd); elm_widget_del_hook_set(obj, _del_hook); elm_widget_theme_hook_set(obj, _theme_hook); elm_widget_can_focus_set(obj, EINA_FALSE); wd->sep = edje_object_add(e); _elm_theme_object_set(obj, wd->sep, "separator", "vertical", "default"); elm_widget_resize_object_set(obj, wd->sep); _mirrored_set(obj, elm_widget_mirrored_get(obj)); _sizing_eval(obj); return obj; }
static void _theme_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; _elm_widget_mirrored_reload(obj); _mirrored_set(obj, elm_widget_mirrored_get(obj)); _elm_theme_object_set(obj, wd->bbl, "bubble", wd->corner, elm_widget_style_get(obj)); edje_object_part_text_set(wd->bbl, "elm.text", wd->label); if (wd->label) edje_object_signal_emit(wd->bbl, "elm,state,text,visible", "elm"); else edje_object_signal_emit(wd->bbl, "elm,state,text,hidden", "elm"); edje_object_part_text_set(wd->bbl, "elm.info", wd->info); if (wd->info) edje_object_signal_emit(wd->bbl, "elm,state,info,visible", "elm"); else edje_object_signal_emit(wd->bbl, "elm,state,info,hidden", "elm"); if (wd->content) { edje_object_part_swallow(wd->bbl, "elm.swallow.content", wd->content); edje_object_message_signal_process(wd->bbl); } if (wd->icon) edje_object_signal_emit(wd->bbl, "elm,state,icon,visible", "elm"); else edje_object_signal_emit(wd->bbl, "elm,state,icon,hidden", "elm"); edje_object_scale_set(wd->bbl, elm_widget_scale_get(obj) * _elm_config->scale); _sizing_eval(obj); }
static void _block_events_theme_apply(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); const char *style = elm_widget_style_get(obj); _elm_theme_object_set(obj, wd->block_events, "notify", "block_events", style); }
static void _theme_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; _elm_widget_mirrored_reload(obj); _mirrored_set(obj, elm_widget_mirrored_get(obj)); _elm_theme_object_set(obj, wd->frm, "frame", "base", elm_widget_style_get(obj)); edje_object_part_text_set(wd->frm, "elm.text", wd->label); if (wd->content) edje_object_part_swallow(wd->frm, "elm.swallow.content", wd->content); edje_object_scale_set(wd->frm, elm_widget_scale_get(obj) * _elm_config->scale); _sizing_eval(obj); }
static void _notify_theme_apply(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); const char *style = elm_widget_style_get(obj); switch (wd->orient) { case ELM_NOTIFY_ORIENT_TOP: _elm_theme_object_set(obj, wd->notify, "notify", "top", style); break; case ELM_NOTIFY_ORIENT_CENTER: _elm_theme_object_set(obj, wd->notify, "notify", "center", style); break; case ELM_NOTIFY_ORIENT_BOTTOM: _elm_theme_object_set(obj, wd->notify, "notify", "bottom", style); break; case ELM_NOTIFY_ORIENT_LEFT: _elm_theme_object_set(obj, wd->notify, "notify", "left", style); break; case ELM_NOTIFY_ORIENT_RIGHT: _elm_theme_object_set(obj, wd->notify, "notify", "right", style); break; case ELM_NOTIFY_ORIENT_TOP_LEFT: _elm_theme_object_set(obj, wd->notify, "notify", "top_left", style); break; case ELM_NOTIFY_ORIENT_TOP_RIGHT: _elm_theme_object_set(obj, wd->notify, "notify", "top_right", style); break; case ELM_NOTIFY_ORIENT_BOTTOM_LEFT: _elm_theme_object_set(obj, wd->notify, "notify", "bottom_left", style); break; case ELM_NOTIFY_ORIENT_BOTTOM_RIGHT: _elm_theme_object_set(obj, wd->notify, "notify", "bottom_right", style); break; case ELM_NOTIFY_ORIENT_LAST: break; } }
static void _theme_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); Evas_Coord w, h; _elm_theme_object_set(obj, wd->base, "bg", "base", elm_widget_style_get(obj)); if (wd->rect) edje_object_part_swallow(wd->base, "elm.swallow.rectangle", wd->rect); if (wd->img) edje_object_part_swallow(wd->base, "elm.swallow.background", wd->img); if (wd->overlay) edje_object_part_swallow(wd->base, "elm.swallow.content", wd->overlay); // FIXME: if i don't do this, bg doesnt calc correctly. why? evas_object_geometry_get(wd->base, NULL, NULL, &w, &h); evas_object_resize(wd->base, w, h); }
static void _theme_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); int i; if ((!wd) || (!wd->base)) return; _elm_theme_object_set(obj, wd->base, "colorselector", "bg", elm_widget_style_get(obj)); for (i = 0; i < 4; i++) { evas_object_del(wd->cp[i]->colorbar); wd->cp[i]->colorbar = NULL; evas_object_del(wd->cp[i]->bar); wd->cp[i]->bar = NULL; evas_object_del(wd->cp[i]->lbt); wd->cp[i]->lbt = NULL; evas_object_del(wd->cp[i]->rbt); wd->cp[i]->rbt = NULL; if (i != 0) { evas_object_del(wd->cp[i]->bg_rect); wd->cp[i]->bg_rect = NULL; } evas_object_del(wd->cp[i]->arrow); wd->cp[i]->arrow = NULL; evas_object_del(wd->cp[i]->touch_area); wd->cp[i]->touch_area = NULL; } _add_colorbar(obj); elm_colorselector_color_set(obj, wd->r, wd->g, wd->b, wd->a); _sizing_eval(obj); }