コード例 #1
0
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);
}
コード例 #2
0
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);
}
コード例 #3
0
static void
_theme_hook(Evas_Object *obj)
{
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
    _elm_widget_mirrored_reload(obj);
    if (wd->scr)
    {
        Evas_Object *edj;
        const char *str;

        _mirrored_set(obj, elm_widget_mirrored_get(obj));
        elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base",
                                            elm_widget_style_get(obj));
        //   scale = (elm_widget_scale_get(obj) * _elm_config->scale);
        //   edje_object_scale_set(wd->scr, scale);
        edj = elm_smart_scroller_edje_object_get(wd->scr);
        str = edje_object_data_get(edj, "focus_highlight");
        if ((str) && (!strcmp(str, "on")))
            elm_widget_highlight_in_theme_set(obj, EINA_TRUE);
        else
            elm_widget_highlight_in_theme_set(obj, EINA_FALSE);
    }

    _sizing_eval(obj);
}
コード例 #4
0
ファイル: elm_bubble.c プロジェクト: wargio/EFL-PS3
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);
}
コード例 #5
0
ファイル: elm_notify.c プロジェクト: FlorentRevest/Elementary
static void
_block_events_theme_apply(Evas_Object *obj)
{
   ELM_NOTIFY_DATA_GET(obj, sd);

   const char *style = elm_widget_style_get(obj);

   if (!elm_layout_theme_set
       (sd->block_events, "notify", "block_events", style))
     CRI("Failed to set layout!");
}
コード例 #6
0
ファイル: elm_frame.c プロジェクト: wargio/EFL-PS3
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);
}
コード例 #7
0
ファイル: elm_notify.c プロジェクト: FlorentRevest/Elementary
static void
_notify_theme_apply(Evas_Object *obj)
{
   const char *style = elm_widget_style_get(obj);
   const char *position;
   double ax, ay;

   ELM_NOTIFY_DATA_GET(obj, sd);

   ax = sd->horizontal_align;
   ay = sd->vertical_align;
   if ((elm_widget_mirrored_get(obj)) && (ax != ELM_NOTIFY_ALIGN_FILL)) ax = 1.0 - ax;

   if (ay == 0.0)
     {
        if (ax == 0.0)
          position = "top_left";
        else if (ax == 1.0)
          position = "top_right";
        else
          position = "top";
     }
   else if (ay == 1.0)
     {
        if (ax == 0.0)
          position = "bottom_left";
        else if (ax == 1.0)
          position = "bottom_right";
        else
          position = "bottom";
     }
   else
     {
        if (ax == 0.0)
          position = "left";
        else if (ax == 1.0)
          position = "right";
        else
          position = "center";
     }

   elm_widget_theme_object_set(obj, sd->notify, "notify", position, style);
}
コード例 #8
0
ファイル: elm_bg.c プロジェクト: wargio/EFL-PS3
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);
}
コード例 #9
0
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;
     }
}
コード例 #10
0
ファイル: elm_notify.c プロジェクト: rzr/testing-elementary18
static void
_notify_theme_apply(Evas_Object *obj)
{
   const char *style = elm_widget_style_get(obj);
   double ax, ay;

   ELM_NOTIFY_DATA_GET(obj, sd);

   ax = sd->horizontal_align;
   ay = sd->vertical_align;
   if ((elm_widget_mirrored_get(obj)) && (ax != ELM_NOTIFY_ALIGN_FILL)) ax = 1.0 - ax;

   if (ay == 0.0)
     elm_widget_theme_object_set(obj, sd->notify, "notify", "top", style);
   else if (ay == 1.0)
     elm_widget_theme_object_set(obj, sd->notify, "notify", "bottom", style);
   else if (ax == 0.0)
     elm_widget_theme_object_set(obj, sd->notify, "notify", "left", style);
   else if (ax == 1.0)
     elm_widget_theme_object_set(obj, sd->notify, "notify", "right", style);
   else
     elm_widget_theme_object_set(obj, sd->notify, "notify", "center", style);
}
コード例 #11
0
ファイル: elm_photo.c プロジェクト: Limsik/e17
static Eina_Bool
_elm_photo_smart_theme(Evas_Object *obj)
{
   ELM_PHOTO_DATA_GET(obj, sd);

   if (!ELM_WIDGET_CLASS(_elm_photo_parent_sc)->theme(obj))
     return EINA_FALSE;

   edje_object_mirrored_set
     (ELM_WIDGET_DATA(sd)->resize_obj, elm_widget_mirrored_get(obj));

   elm_widget_theme_object_set
     (obj, ELM_WIDGET_DATA(sd)->resize_obj, "photo", "base",
     elm_widget_style_get(obj));

   elm_object_scale_set(sd->icon, elm_widget_scale_get(obj));

   edje_object_scale_set(ELM_WIDGET_DATA(sd)->resize_obj,
                         elm_widget_scale_get(obj) * elm_config_scale_get());
   _sizing_eval(obj);

   return EINA_TRUE;
}
コード例 #12
0
ファイル: elm_photo.c プロジェクト: tasn/efl
EOLIAN static Eina_Error
_elm_photo_efl_ui_widget_theme_apply(Eo *obj, Elm_Photo_Data *sd)
{
   Eina_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
   ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);

   int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
   if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;

   edje_object_mirrored_set
     (wd->resize_obj, efl_ui_mirrored_get(obj));

   elm_widget_theme_object_set
     (obj, wd->resize_obj, "photo", "base",
     elm_widget_style_get(obj));

   elm_object_scale_set(sd->icon, efl_gfx_entity_scale_get(obj));

   edje_object_scale_set(wd->resize_obj,
                         efl_gfx_entity_scale_get(obj) * elm_config_scale_get());
   _sizing_eval(obj);

   return int_ret;
}
コード例 #13
0
ファイル: elc_fileselector_button.c プロジェクト: Limsik/e17
static Eina_Bool
_elm_fileselector_button_smart_theme(Evas_Object *obj)
{
   char buf[4096];
   const char *style;

   ELM_FILESELECTOR_BUTTON_DATA_GET(obj, sd);

   style = eina_stringshare_add(elm_widget_style_get(obj));

   snprintf(buf, sizeof(buf), "fileselector_button/%s", style);

   /* file selector button's style has an extra bit */
   eina_stringshare_replace(&(ELM_WIDGET_DATA(sd)->style), buf);

   if (!ELM_WIDGET_CLASS(_elm_fileselector_button_parent_sc)->theme(obj))
     return EINA_FALSE;

   eina_stringshare_replace(&(ELM_WIDGET_DATA(sd)->style), style);

   eina_stringshare_del(style);

   return EINA_TRUE;
}
コード例 #14
0
ファイル: elm_photo.c プロジェクト: Stefan-Schmidt/efl
EOLIAN static Elm_Theme_Apply
_elm_photo_elm_widget_theme_apply(Eo *obj, Elm_Photo_Data *sd)
{
   Elm_Theme_Apply int_ret = ELM_THEME_APPLY_FAILED;
   ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);

   int_ret = elm_obj_widget_theme_apply(efl_super(obj, MY_CLASS));
   if (!int_ret) return ELM_THEME_APPLY_FAILED;

   edje_object_mirrored_set
     (wd->resize_obj, elm_widget_mirrored_get(obj));

   elm_widget_theme_object_set
     (obj, wd->resize_obj, "photo", "base",
     elm_widget_style_get(obj));

   elm_object_scale_set(sd->icon, elm_widget_scale_get(obj));

   edje_object_scale_set(wd->resize_obj,
                         elm_widget_scale_get(obj) * elm_config_scale_get());
   _sizing_eval(obj);

   return int_ret;
}
コード例 #15
0
ファイル: elm_colorselector.c プロジェクト: wargio/EFL-PS3
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);
}
コード例 #16
0
static Eina_Bool
_elm_fileselector_smart_theme(Evas_Object *obj)
{
   const char *style;
   const char *data;
   char buf[1024];

   ELM_FILESELECTOR_DATA_GET(obj, sd);

   if (!ELM_WIDGET_CLASS(_elm_fileselector_parent_sc)->theme(obj)) return EINA_FALSE;

   style = elm_widget_style_get(obj);
   _mirrored_set(obj, elm_widget_mirrored_get(obj));

   data = edje_object_data_get
       (ELM_WIDGET_DATA(sd)->resize_obj, "path_separator");
   if (data) sd->path_separator = data;
   else sd->path_separator = "/";

   snprintf(buf, sizeof(buf), "fileselector/%s", style);

#define SWALLOW(part_name, object_ptn)                          \
  if (object_ptn)                                               \
    {                                                           \
       elm_widget_style_set(object_ptn, buf);                   \
       if (!elm_layout_content_set(obj, part_name, object_ptn)) \
         evas_object_hide(object_ptn);                          \
    }

   SWALLOW("elm.swallow.up", sd->up_button);
   SWALLOW("elm.swallow.home", sd->home_button);
   SWALLOW("elm.swallow.spinner", sd->spinner);
   elm_object_style_set(sd->spinner, "wheel");

   if (sd->mode == ELM_FILESELECTOR_LIST)
     {
        if (elm_layout_content_set(obj, "elm.swallow.files", sd->files_list))
          evas_object_hide(sd->files_grid);
        else evas_object_hide(sd->files_list);
     }
   else
     {
        if (elm_layout_content_set(obj, "elm.swallow.files", sd->files_grid))
          evas_object_hide(sd->files_list);
        else evas_object_hide(sd->files_grid);
     }

   SWALLOW("elm.swallow.filename", sd->filename_entry);
   SWALLOW("elm.swallow.path", sd->path_entry);

   snprintf(buf, sizeof(buf), "fileselector/actions/%s", style);
   SWALLOW("elm.swallow.cancel", sd->cancel_button);
   SWALLOW("elm.swallow.ok", sd->ok_button);

#undef SWALLOW

   edje_object_message_signal_process(ELM_WIDGET_DATA(sd)->resize_obj);

   elm_layout_sizing_eval(obj);

   return EINA_TRUE;
}