]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/gossip-ui-utils.c
[darcs-to-svn @ Fix icon size]
[empathy.git] / libempathy-gtk / gossip-ui-utils.c
index 9bf2fb36d305393d0f10f3f38eefc7d5e3841863..cf12a51bb00e867427e0e7abbd10bab71a5fc3fb 100644 (file)
@@ -208,12 +208,18 @@ gossip_pixbuf_from_icon_name (const gchar *icon_name,
        GtkIconTheme  *theme;
        GdkPixbuf     *pixbuf = NULL;
        GError        *error = NULL;
+       gint           w, h;
+       gint           size = 48;
 
        theme = gtk_icon_theme_get_default ();
 
+       if (gtk_icon_size_lookup (icon_size, &w, &h)) {
+               size = (w + h) / 2;
+       }
+
        pixbuf = gtk_icon_theme_load_icon (theme,
                                           icon_name,
-                                          icon_size,
+                                          size,
                                           0,
                                           &error);
        if (error) {