From 92a078ac325051976cce0469dd47a88736d32687 Mon Sep 17 00:00:00 2001 From: Hannes Janetzek Date: Thu, 17 Feb 2011 19:53:09 +0000 Subject: [PATCH] get larger icons by temporarily changing e_scale SVN revision: 57131 --- src/modules/everything/evry_util.c | 75 ++++++------------------------ 1 file changed, 14 insertions(+), 61 deletions(-) diff --git a/src/modules/everything/evry_util.c b/src/modules/everything/evry_util.c index 05c31b011..942da074c 100644 --- a/src/modules/everything/evry_util.c +++ b/src/modules/everything/evry_util.c @@ -389,74 +389,27 @@ evry_util_plugin_items_add(Evry_Plugin *p, Eina_List *items, const char *input, 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 * evry_icon_theme_get(const char *icon, Evas *e) { Evas_Object *obj = e_icon_add(e); e_icon_preload_set(obj, 1); - if (e_config->icon_theme_overrides) - { - if (_evry_util_icon_fdo_set(obj, icon)) - 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; - } + /* just changed 48 to 144.. we need + evry_icon_theme_set(Evas_Object *obj, const char *icon, + size:small, mid, large) */ - evas_object_del(obj); - - return NULL; + double tmp = e_scale; + e_scale = 3.0; + + if (!e_util_icon_theme_set(obj, icon)) + { + evas_object_del(obj); + obj = NULL; + } + e_scale = tmp; + + return obj; } static Evas_Object *