Mercurial > pidgin
changeset 17409: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 | 0dbb403c9016 |
children | bfdc5995d54a 55ded28f6640 |
files | pidgin/gtkstatusbox.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
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 }