Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
17490:0dbb403c9016 | 17492:e7595d13fd63 |
---|---|
2027 { | 2027 { |
2028 #if GTK_CHECK_VERSION(2,2,0) | 2028 #if GTK_CHECK_VERSION(2,2,0) |
2029 int w, h; | 2029 int w, h; |
2030 GtkIconSize icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_MEDIUM); | 2030 GtkIconSize icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_MEDIUM); |
2031 gtk_icon_size_lookup(icon_size, &w, &h); | 2031 gtk_icon_size_lookup(icon_size, &w, &h); |
2032 if (height > width) | |
2033 w = width * h / height; | |
2034 else if (width > height) | |
2035 h = height * w / width; | |
2032 gdk_pixbuf_loader_set_size(loader, w, h); | 2036 gdk_pixbuf_loader_set_size(loader, w, h); |
2033 #endif | 2037 #endif |
2034 } | 2038 } |
2035 | 2039 |
2036 static void | 2040 static void |