forked from enlightenment/enlightenment
get larger icons by temporarily changing e_scale
SVN revision: 57131
This commit is contained in:
parent
afade15978
commit
92a078ac32
|
@ -389,74 +389,27 @@ evry_util_plugin_items_add(Evry_Plugin *p, Eina_List *items, const char *input,
|
||||||
return !!(p->items);
|
return !!(p->items);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* taken from e_utils. just changed 48 to 72.. we need
|
|
||||||
evry_icon_theme_set(Evas_Object *obj, const char *icon,
|
|
||||||
size:small, mid, large) */
|
|
||||||
static int
|
|
||||||
_evry_util_icon_theme_set(Evas_Object *obj, const char *icon, Eina_Bool fallback)
|
|
||||||
{
|
|
||||||
const char *file;
|
|
||||||
char buf[PATH_MAX];
|
|
||||||
|
|
||||||
if ((!icon) || (!icon[0])) return 0;
|
|
||||||
snprintf(buf, sizeof(buf), "e/icons/%s", icon);
|
|
||||||
|
|
||||||
if (fallback)
|
|
||||||
file = e_theme_edje_icon_fallback_file_get(buf);
|
|
||||||
else
|
|
||||||
file = e_theme_edje_file_get("base/theme/icons", buf);
|
|
||||||
|
|
||||||
if (file[0])
|
|
||||||
{
|
|
||||||
e_icon_file_edje_set(obj, file, buf);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
_evry_util_icon_fdo_set(Evas_Object *obj, const char *icon)
|
|
||||||
{
|
|
||||||
const char *path = NULL;
|
|
||||||
unsigned int size;
|
|
||||||
|
|
||||||
if ((!icon) || (!icon[0])) return 0;
|
|
||||||
size = e_util_icon_size_normalize(128);
|
|
||||||
path = efreet_icon_path_find(e_config->icon_theme, icon, size);
|
|
||||||
if (!path) return 0;
|
|
||||||
e_icon_file_set(obj, path);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Evas_Object *
|
Evas_Object *
|
||||||
evry_icon_theme_get(const char *icon, Evas *e)
|
evry_icon_theme_get(const char *icon, Evas *e)
|
||||||
{
|
{
|
||||||
Evas_Object *obj = e_icon_add(e);
|
Evas_Object *obj = e_icon_add(e);
|
||||||
e_icon_preload_set(obj, 1);
|
e_icon_preload_set(obj, 1);
|
||||||
|
|
||||||
if (e_config->icon_theme_overrides)
|
/* just changed 48 to 144.. we need
|
||||||
{
|
evry_icon_theme_set(Evas_Object *obj, const char *icon,
|
||||||
if (_evry_util_icon_fdo_set(obj, icon))
|
size:small, mid, large) */
|
||||||
return obj;
|
|
||||||
if (_evry_util_icon_theme_set(obj, icon, EINA_FALSE))
|
|
||||||
return obj;
|
|
||||||
if (_evry_util_icon_theme_set(obj, icon, EINA_TRUE))
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (_evry_util_icon_theme_set(obj, icon, EINA_FALSE))
|
|
||||||
return obj;
|
|
||||||
if (_evry_util_icon_fdo_set(obj, icon))
|
|
||||||
return obj;
|
|
||||||
if (_evry_util_icon_theme_set(obj, icon, EINA_TRUE))
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
evas_object_del(obj);
|
double tmp = e_scale;
|
||||||
|
e_scale = 3.0;
|
||||||
return NULL;
|
|
||||||
|
if (!e_util_icon_theme_set(obj, icon))
|
||||||
|
{
|
||||||
|
evas_object_del(obj);
|
||||||
|
obj = NULL;
|
||||||
|
}
|
||||||
|
e_scale = tmp;
|
||||||
|
|
||||||
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Evas_Object *
|
static Evas_Object *
|
||||||
|
|
Loading…
Reference in New Issue