# HG changeset patch # User Sean Egan # Date 1180642963 0 # Node ID e7595d13fd63d3cfc9749474e0f6cd094d39a9c9 # Parent 0dbb403c90163750aa3d15d6768dacfdca19bdfd Maintain aspect ratio on global icon selector. Fixes #454 diff -r 0dbb403c9016 -r e7595d13fd63 pidgin/gtkstatusbox.c --- 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 }