Getting toolbar icon size in theme.
Uses icon_size from elm_config as fallback. By: Otavio Pontes <otavio@profusion.mobi> SVN revision: 54347
This commit is contained in:
parent
998d6de755
commit
0f4950bb1d
|
@ -90,6 +90,16 @@ end:
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
_elm_toolbar_icon_size_get(Widget_Data *wd)
|
||||||
|
{
|
||||||
|
const char *icon_size = edje_object_data_get(
|
||||||
|
elm_smart_scroller_edje_object_get(wd->scr), "icon_size");
|
||||||
|
if (icon_size)
|
||||||
|
return atoi(icon_size);
|
||||||
|
return _elm_config->icon_size;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_item_show(Elm_Toolbar_Item *it)
|
_item_show(Elm_Toolbar_Item *it)
|
||||||
{
|
{
|
||||||
|
@ -251,6 +261,7 @@ _theme_hook(Evas_Object *obj)
|
||||||
elm_smart_scroller_object_theme_set(obj, wd->scr, "toolbar", "base", elm_widget_style_get(obj));
|
elm_smart_scroller_object_theme_set(obj, wd->scr, "toolbar", "base", elm_widget_style_get(obj));
|
||||||
scale = (elm_widget_scale_get(obj) * _elm_config->scale);
|
scale = (elm_widget_scale_get(obj) * _elm_config->scale);
|
||||||
edje_object_scale_set(wd->scr, scale);
|
edje_object_scale_set(wd->scr, scale);
|
||||||
|
wd->icon_size = _elm_toolbar_icon_size_get(wd);
|
||||||
EINA_INLIST_FOREACH(wd->items, it)
|
EINA_INLIST_FOREACH(wd->items, it)
|
||||||
{
|
{
|
||||||
Evas_Object *view = it->base.view;
|
Evas_Object *view = it->base.view;
|
||||||
|
@ -643,7 +654,10 @@ elm_toolbar_add(Evas_Object *parent)
|
||||||
ELM_SMART_SCROLLER_POLICY_AUTO,
|
ELM_SMART_SCROLLER_POLICY_AUTO,
|
||||||
ELM_SMART_SCROLLER_POLICY_OFF);
|
ELM_SMART_SCROLLER_POLICY_OFF);
|
||||||
|
|
||||||
wd->icon_size = _elm_config->icon_size;
|
|
||||||
|
wd->icon_size = _elm_toolbar_icon_size_get(wd);
|
||||||
|
|
||||||
|
|
||||||
wd->homogeneous = EINA_TRUE;
|
wd->homogeneous = EINA_TRUE;
|
||||||
wd->align = 0.5;
|
wd->align = 0.5;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue