_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Widget_Data *wd = elm_widget_data_get(data);
- if (wd->content)
- edje_object_part_swallow(wd->bbl, "elm.swallow.content", wd->content);
- if (wd->icon)
- edje_object_part_swallow(wd->bbl, "elm.swallow.icon", wd->icon);
_sizing_eval(data);
}
Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return;
if (obj != wd->icon) return;
- edje_object_part_swallow(wd->btn, "elm.swallow.content", obj);
_sizing_eval(data);
}
{
Widget_Data *wd = elm_widget_data_get(data);
if (obj != wd->icon) return;
- edje_object_part_swallow(wd->chk, "elm.swallow.content", obj);
Evas_Coord mw, mh;
evas_object_size_hint_min_get(obj, &mw, &mh);
_sizing_eval(data);
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Widget_Data *wd = elm_widget_data_get(data);
-
- edje_object_part_swallow(wd->frm, "elm.swallow.content", obj);
_sizing_eval(data);
}
static void _theme_hook(Evas_Object *obj);
static void _sizing_eval(Evas_Object *obj);
static void _reval_content(Evas_Object *obj);
-static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _sub_del(void *data, Evas_Object *obj, void *event_info);
static void _hov_show_do(Evas_Object *obj);
static void _hov_move(void *data, Evas *e, Evas_Object *obj, void *event_info);
evas_object_move(wd->cov, x, y);
evas_object_resize(wd->cov, w, h);
evas_object_size_hint_min_set(wd->offset, x2 - x, y2 - y);
- edje_object_part_swallow(wd->cov, "elm.swallow.offset", wd->offset);
evas_object_size_hint_min_set(wd->size, w2, h2);
- edje_object_part_swallow(wd->cov, "elm.swallow.size", wd->size);
}
static void
}
static void
-_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- Widget_Data *wd = elm_widget_data_get(data);
- const Eina_List *l;
- const Subinfo *si;
-
- EINA_LIST_FOREACH(wd->subs, l, si)
- {
- if (si->obj == obj)
- {
- edje_object_part_swallow(wd->cov, si->swallow, si->obj);
- break;
- }
- }
-}
-
-static void
_sub_del(void *data, Evas_Object *obj, void *event_info)
{
Widget_Data *wd = elm_widget_data_get(obj);
{
if (si->obj == sub)
{
- evas_object_event_callback_del(sub,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints);
wd->subs = eina_list_remove_list(wd->subs, l);
eina_stringshare_del(si->swallow);
free(si);
{
elm_widget_sub_object_add(obj, content);
edje_object_part_swallow(wd->cov, buf, content);
- evas_object_event_callback_add(content,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints, obj);
si = ELM_NEW(Subinfo);
si->swallow = eina_stringshare_add(buf);
si->obj = content;
Item *it, **itfit = NULL;
Evas_Coord mw, mh, w, h;
int i = 0;
- char buf[1024];
if (wd->level_active[level]) return;
evas_object_geometry_get(box, NULL, NULL, &w, &h);
}
}
}
- snprintf(buf, sizeof(buf), "elm.swallow.index.%i", level);
-// evas_object_size_hint_min_get(box, &mw, &mh);
-// evas_object_size_hint_min_set(box, mw, 0);
- edje_object_part_swallow(wd->base, buf, box);
+ evas_object_smart_calculate(box);
wd->level_active[level] = 1;
}
Widget_Data *wd = elm_widget_data_get(obj);
Eina_List *l;
Item *it;
- char buf[1024];
if (!wd->level_active[level]) return;
EINA_LIST_FOREACH(wd->items, l, it)
evas_object_del(it->base);
it->base = 0;
}
- snprintf(buf, sizeof(buf), "elm.swallow.index.%i", level);
- edje_object_part_swallow(wd->base, buf, box);
wd->level_active[level] = 0;
}
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Widget_Data *wd = elm_widget_data_get(data);
- const Eina_List *l;
- const Subinfo *si;
-
- EINA_LIST_FOREACH(wd->subs, l, si)
- {
- if (si->obj == obj)
- {
- edje_object_part_swallow(wd->lay, si->swallow, obj);
- _sizing_eval(data);
- break;
- }
- }
+ _sizing_eval(data);
}
static void
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Widget_Data *wd = elm_widget_data_get(data);
-
- edje_object_part_swallow(wd->notify, "elm.swallow.content", obj);
_sizing_eval(data);
}
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Item *it = data;
- edje_object_part_swallow(it->base, "elm.swallow.content", it->content);
edje_object_size_min_calc(it->base, &it->minw, &it->minh);
_sizing_eval(it->obj);
}
{
Widget_Data *wd = elm_widget_data_get(data);
if (obj != wd->icon) return;
- edje_object_part_swallow(wd->progressbar, "elm.swallow.content", obj);
_sizing_eval(data);
}
{
Widget_Data *wd = elm_widget_data_get(data);
if (obj != wd->icon) return;
- edje_object_part_swallow(wd->chk, "elm.swallow.content", obj);
- Evas_Coord mw, mh;
- evas_object_size_hint_min_get(obj, &mw, &mh);
_sizing_eval(data);
}
{
Widget_Data *wd = elm_widget_data_get(data);
if (obj != wd->icon) return;
- edje_object_part_swallow(wd->slider, "elm.swallow.content", obj);
_sizing_eval(data);
}
_theme_hook(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
+ _elm_theme_set(wd->spinner, "spinner", "base", elm_widget_style_get(obj));
+ edje_object_part_swallow(wd->spinner, "elm.swallow.entry", wd->ent);
_write_label(obj);
edje_object_message_signal_process(wd->spinner);
edje_object_scale_set(wd->spinner, elm_widget_scale_get(obj) * _elm_config->scale);
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Widget_Data *wd = elm_widget_data_get(data);
- Evas_Coord mw, mh;
-
if (obj != wd->icon) return;
- edje_object_part_swallow(wd->tgl, "elm.swallow.content", obj);
- evas_object_size_hint_min_get(obj, &mw, &mh);
_sizing_eval(data);
}
};
static void _elm_win_obj_callback_del(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void _elm_win_obj_callback_show(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _elm_win_resize(Ecore_Evas *ee);
static void _elm_win_delete_request(Ecore_Evas *ee);
static void _elm_win_resize_job(void *data);
}
static void
+_elm_win_obj_callback_show(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ // this is called to make sure all smart containers have calculated their
+ // sizes BEFORE we show the window to make sure it initially appears at
+ // our desired size (ie min size is known first)
+ evas_call_smarts_calculate(e);
+}
+
+static void
_elm_win_delete_request(Ecore_Evas *ee)
{
Evas_Object *obj = ecore_evas_object_associate_get(ee);
evas_object_layer_set(win->win_obj, 50);
evas_object_pass_events_set(win->win_obj, 1);
+ evas_object_event_callback_add(win->win_obj, EVAS_CALLBACK_SHOW,
+ _elm_win_obj_callback_show, win);
ecore_evas_object_associate(win->ee, win->win_obj,
ECORE_EVAS_OBJECT_ASSOCIATE_BASE |
ECORE_EVAS_OBJECT_ASSOCIATE_STACK |
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Widget_Data *wd = elm_widget_data_get(data);
- edje_object_part_swallow(wd->frm, "elm.swallow.content", obj);
_sizing_eval(data);
}