forked from enlightenment/efl
When the number of item is changed, the toolbar emits the signal to theme.
The theme can be changed something according the number of item. SVN revision: 76487
This commit is contained in:
parent
1ac12fe423
commit
4613933a34
|
@ -456,3 +456,8 @@
|
||||||
|
|
||||||
* Even if the top item is inserted into the naviframe. Any transition
|
* Even if the top item is inserted into the naviframe. Any transition
|
||||||
wouldn't be launched.
|
wouldn't be launched.
|
||||||
|
|
||||||
|
2012-09-12 Jaehwan Kim
|
||||||
|
|
||||||
|
* When the number of item is changed, the toolbar emits the signal to theme.
|
||||||
|
The theme can be changed something according the number of item.
|
||||||
|
|
|
@ -775,6 +775,32 @@ _item_theme_hook(Evas_Object *obj,
|
||||||
evas_object_size_hint_min_set(view, minw, mh);
|
evas_object_size_hint_min_set(view, minw, mh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_inform_item_number(Evas_Object *obj)
|
||||||
|
{
|
||||||
|
ELM_TOOLBAR_DATA_GET(obj, sd);
|
||||||
|
Elm_Toolbar_Item *it;
|
||||||
|
char buf[sizeof("elm,action,click,") + 3];
|
||||||
|
static int scount = 0;
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
EINA_INLIST_FOREACH(sd->items, it)
|
||||||
|
{
|
||||||
|
if (!it->separator) count++;
|
||||||
|
}
|
||||||
|
if (scount != count)
|
||||||
|
{
|
||||||
|
scount = count;
|
||||||
|
sprintf(buf, "elm,number,item,%d", count);
|
||||||
|
|
||||||
|
EINA_INLIST_FOREACH(sd->items, it)
|
||||||
|
{
|
||||||
|
if (!it->separator && !it->object)
|
||||||
|
edje_object_signal_emit(VIEW(it), buf, "elm");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_sizing_eval(Evas_Object *obj)
|
_sizing_eval(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
@ -835,6 +861,8 @@ _sizing_eval(Evas_Object *obj)
|
||||||
evas_object_resize(sd->more, w, h);
|
evas_object_resize(sd->more, w, h);
|
||||||
evas_object_size_hint_min_set(obj, minw, minh);
|
evas_object_size_hint_min_set(obj, minw, minh);
|
||||||
evas_object_size_hint_max_set(obj, -1, -1);
|
evas_object_size_hint_max_set(obj, -1, -1);
|
||||||
|
|
||||||
|
_inform_item_number(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
|
|
Loading…
Reference in New Issue