Mercurial > pidgin.yaz
diff pidgin/gtkstatusbox.c @ 17492:e7595d13fd63
Maintain aspect ratio on global icon selector. Fixes #454
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 31 May 2007 20:22:43 +0000 |
parents | 7f00fb7f18b5 |
children | 4ca97b26a8fb |
line wrap: on
line diff
--- 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 }