Thu, 31 May 2007 20:22:43 +0000
Maintain aspect ratio on global icon selector. Fixes #454
| pidgin/gtkstatusbox.c | file | annotate | diff | comparison | revisions |
--- a/pidgin/gtkstatusbox.c Thu May 31 03:02:13 2007 +0000 +++ b/pidgin/gtkstatusbox.c Thu May 31 20:22:43 2007 +0000 @@ -2029,6 +2029,10 @@ int w, h; GtkIconSize icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_MEDIUM); gtk_icon_size_lookup(icon_size, &w, &h); + if (height > width) + w = width * h / height; + else if (width > height) + h = height * w / width; gdk_pixbuf_loader_set_size(loader, w, h); #endif }