fix: size < ret_size is always false. scale icons less
authorHannes Janetzek <hannes.janetzek@gmail.com>
Mon, 14 Feb 2011 14:28:21 +0000 (14:28 +0000)
committerHannes Janetzek <hannes.janetzek@gmail.com>
Mon, 14 Feb 2011 14:28:21 +0000 (14:28 +0000)
SVN revision: 57021

legacy/efreet/src/lib/efreet_icon.c

index 6b8849d..3ce1674 100644 (file)
@@ -627,14 +627,15 @@ efreet_icon_lookup_icon(Efreet_Cache_Icon *icon, unsigned int size)
         distance = efreet_icon_size_distance(icon->icons[i], size);
         if (distance > minimal_distance) continue;
         // prefer downsizing
-        if ((distance == minimal_distance) && (size < ret_size)) continue;
+        if ((distance == minimal_distance) && (icon->icons[i]->normal < ret_size)) continue;
 
         tmp = efreet_icon_lookup_path(icon->icons[i]);
+
         if (tmp)
         {
             path = tmp;
             minimal_distance = distance;
-            ret_size = size;
+            ret_size = icon->icons[i]->normal;
         }
     }