Mercurial > pidgin
changeset 16571:6f3585f8a027
merge of '0688801ca4ae33291c9078b8181e01f85ef7a4a1'
and '96c17aa92f27f926d9d4c366b3c2c308f8251424'
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sat, 28 Apr 2007 05:38:15 +0000 |
parents | 99bf55ec6ca4 (current diff) 43e119f590ce (diff) |
children | 390987ecddf3 |
files | |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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);