# HG changeset patch # User Richard Laager # Date 1177738695 0 # Node ID 6f3585f8a027fcc26d958dd344267c95561b634d # Parent 99bf55ec6ca42870b1ab5ef4e626266653499628# Parent 43e119f590ce6cb462241fd8671fb0df0ce9d76b merge of '0688801ca4ae33291c9078b8181e01f85ef7a4a1' and '96c17aa92f27f926d9d4c366b3c2c308f8251424' diff -r 99bf55ec6ca4 -r 6f3585f8a027 pidgin/pidginstock.c --- a/pidgin/pidginstock.c Sat Apr 28 05:37:56 2007 +0000 +++ b/pidgin/pidginstock.c Sat Apr 28 05:38:15 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);