summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-01-25 15:39:43 +0100
committerDave Andreoli <dave@gurumeditation.it>2015-01-25 15:39:43 +0100
commit5ebcfb6b56b4a5aa737bbddd0d1dc3a7a0c8bc79 (patch)
treeba432a6ff8f9710bd02d01f414827ccf492f98de
parentd4cf8e4fcb84736d11686f29abce87fd1c96188a (diff)
Icon: no more reimplement sizing_eval
The code there was trying to reload the icon to have an image that should match the requested size, this was totally wrong, the calculation was always resulting in an image bigger than the needed. It was also useless as this logic is yet handled in the resize callback.
-rw-r--r--src/lib/elm_icon.c27
-rw-r--r--src/lib/elm_icon.eo1
2 files changed, 0 insertions, 28 deletions
diff --git a/src/lib/elm_icon.c b/src/lib/elm_icon.c
index 55f426973..0b79a4222 100644
--- a/src/lib/elm_icon.c
+++ b/src/lib/elm_icon.c
@@ -309,33 +309,6 @@ _icon_freedesktop_set(Evas_Object *obj,
309 return EINA_FALSE; 309 return EINA_FALSE;
310} 310}
311 311
312EOLIAN static void
313_elm_icon_elm_image_sizing_eval(Eo *obj, Elm_Icon_Data *sd)
314{
315 int w, h;
316
317 if (sd->in_eval) return;
318
319 sd->in_eval++;
320 elm_image_object_size_get(obj, &w, &h);
321
322 if (sd->freedesktop.use && sd->stdicon)
323 {
324 int size;
325 /* This icon has been set to a freedesktop icon, and the requested
326 appears to have a different size than the requested size, so try to
327 request another, higher resolution, icon.
328 FIXME: Find a better heuristic to determine if there should be
329 an icon with a different resolution. */
330 size = ((w / 16) + 1) * 16;
331 _icon_freedesktop_set(obj, sd->stdicon, size);
332 }
333
334 eo_do_super(obj, MY_CLASS, elm_obj_image_sizing_eval());
335
336 sd->in_eval--;
337}
338
339static void 312static void
340_edje_signal_callback(void *data, 313_edje_signal_callback(void *data,
341 Evas_Object *obj EINA_UNUSED, 314 Evas_Object *obj EINA_UNUSED,
diff --git a/src/lib/elm_icon.eo b/src/lib/elm_icon.eo
index e9e0fe10e..7ba7c3f99 100644
--- a/src/lib/elm_icon.eo
+++ b/src/lib/elm_icon.eo
@@ -101,7 +101,6 @@ class Elm_Icon (Elm_Image)
101 Evas.Object_Smart.del; 101 Evas.Object_Smart.del;
102 Elm_Widget.theme_apply; 102 Elm_Widget.theme_apply;
103 Elm_Image.memfile.set; 103 Elm_Image.memfile.set;
104 Elm_Image.sizing_eval;
105 Efl.File.file.set; 104 Efl.File.file.set;
106 } 105 }
107 events { 106 events {