GNOME Bugzilla – Bug 309258
Allow passing width=-1 or height=-1 to gdk_pixbuf_new_from_file_at_size()
Last modified: 2010-07-10 04:07:17 UTC
The panel needs to be able to scale icons to a given width or height (when vertical or horizontal respectively), preserving aspect ratio but not imposing any restrictions in the other dimension. e.g. consider the case of a rectangular menu button which might be 168x48. For a 32 pixel wide horizontal panel, you want that scaled down to 112x32 and on a vertical panel you want it scaled to 32x9. See bug #302223 A nice easy solution is to allow passing -1 for width or height to gdk_pixbuf_new_from_file_at_size() Trivial patch attached
Created attachment 48491 [details] [review] gdk-pixbuf-load-and-scale.diff