# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1322903504 0 # Node ID dfd9f177c34cdbcf5745a60fa49b09fbff9e37e8 # Parent 1628bf383893d26408285292db23d873c040d0b4 Fix incorrect pixbuf scaling on GTK3 when -1 is passed as a parameter to dw_box_pack*() and the item is a bitmap button. diff -r 1628bf383893 -r dfd9f177c34c gtk3/dw.c --- a/gtk3/dw.c Sat Dec 03 04:40:35 2011 +0000 +++ b/gtk3/dw.c Sat Dec 03 09:11:44 2011 +0000 @@ -8293,12 +8293,15 @@ { int pwidth = gdk_pixbuf_get_width(pixbuf); int pheight = gdk_pixbuf_get_height(pixbuf); + + if(width == -1) + width = pwidth; + if(height == -1) + height = pheight; if(pwidth > width || pheight > height) - { pixbuf = gdk_pixbuf_scale_simple(pixbuf, pwidth > width ? width : pwidth, pheight > height ? height : pheight, GDK_INTERP_BILINEAR); - gtk_image_set_from_pixbuf(GTK_IMAGE(image), pixbuf); - } + gtk_image_set_from_pixbuf(GTK_IMAGE(image), pixbuf); } }