# HG changeset patch # User Sean Egan # Date 1177736722 0 # Node ID 43e119f590ce6cb462241fd8671fb0df0ce9d76b # Parent db7e68346e44eaca58deb5bb246ab452787e6804 DennisR noticed that the idle icons were jagged on the sides. This is because I was subtracting 128 from the alpha value of each pixel, rather than halving them, causing anti-aliasing pixels to hit 0 diff -r db7e68346e44 -r 43e119f590ce pidgin/pidginstock.c --- a/pidgin/pidginstock.c Sat Apr 28 04:23:42 2007 +0000 +++ b/pidgin/pidginstock.c Sat Apr 28 05:05:22 2007 +0000 @@ -237,7 +237,7 @@ /* Altered from do_colorshift in gnome-panel */ static void -do_alphashift (GdkPixbuf *dest, GdkPixbuf *src, int shift) +do_alphashift (GdkPixbuf *dest, GdkPixbuf *src) { gint i, j; gint width, height, has_alpha, srcrowstride, destrowstride; @@ -245,7 +245,6 @@ guchar *original_pixels; guchar *pixsrc; guchar *pixdest; - int val; guchar a; has_alpha = gdk_pixbuf_get_has_alpha (src); @@ -267,8 +266,7 @@ *(pixdest++) = *(pixsrc++); *(pixdest++) = *(pixsrc++); a = *(pixsrc++); - val = a - shift; - *(pixdest++) = CLAMP(val, 0, 255); + *(pixdest++) = a / 2; } } } @@ -286,7 +284,7 @@ filename = g_build_filename(DATADIR, "pixmaps", "pidgin", dir, size, file, NULL); pixbuf = gdk_pixbuf_new_from_file(filename, NULL); - do_alphashift(pixbuf, pixbuf, 128); + do_alphashift(pixbuf, pixbuf); source = gtk_icon_source_new(); gtk_icon_source_set_pixbuf(source, pixbuf); @@ -314,7 +312,7 @@ if (rtl) { filename = g_build_filename(DATADIR, "pixmaps", "pidgin", dir, size, "rtl", file, NULL); pixbuf = gdk_pixbuf_new_from_file(filename, NULL); - do_alphashift(pixbuf, pixbuf, 128); + do_alphashift(pixbuf, pixbuf); source = gtk_icon_source_new(); gtk_icon_source_set_pixbuf(source, pixbuf); gtk_icon_source_set_direction(source, GTK_TEXT_DIR_RTL);