diff options
author | Alexander Larsson <alexl@redhat.com> | 2002-11-07 10:54:38 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2002-11-07 10:54:38 +0000 |
commit | 4526ffe8851b6fe49cd5099dd6e65eadc672d044 (patch) | |
tree | 52897aa08104551e790e3894d07a2542dcfda82a | |
parent | dcb38570948b801fc4c1fd6008aeb4886167461d (diff) | |
download | nautilus-4526ffe8851b6fe49cd5099dd6e65eadc672d044.tar.gz |
Make chit alpha blended. New image from Jens Lautenbacher
2002-11-07 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-customization-data.c:
* icons/chit_frame.png:
Make chit alpha blended. New image from Jens Lautenbacher <jtl@schlund.de>.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | icons/chit_frame.png | bin | 985 -> 751 bytes | |||
-rw-r--r-- | libnautilus-private/nautilus-customization-data.c | 23 |
3 files changed, 21 insertions, 8 deletions
@@ -1,3 +1,9 @@ +2002-11-07 Alexander Larsson <alexl@redhat.com> + + * libnautilus-private/nautilus-customization-data.c: + * icons/chit_frame.png: + Make chit alpha blended. New image from Jens Lautenbacher <jtl@schlund.de>. + 2002-11-06 Kjartan Maraas <kmaraas@gnome.org> * src/nautilus-file-management-properties.glade: Fix some bad diff --git a/icons/chit_frame.png b/icons/chit_frame.png Binary files differindex a4905427b..385a2d7fa 100644 --- a/icons/chit_frame.png +++ b/icons/chit_frame.png diff --git a/libnautilus-private/nautilus-customization-data.c b/libnautilus-private/nautilus-customization-data.c index ed51cfb5c..65888ea05 100644 --- a/libnautilus-private/nautilus-customization-data.c +++ b/libnautilus-private/nautilus-customization-data.c @@ -396,22 +396,29 @@ nautilus_customization_make_pattern_chit (GdkPixbuf *pattern_tile, GdkPixbuf *fr { GdkPixbuf *pixbuf, *temp_pixbuf; int frame_width, frame_height; + int pattern_width, pattern_height; frame_width = gdk_pixbuf_get_width (frame); frame_height = gdk_pixbuf_get_height (frame); - + pattern_width = gdk_pixbuf_get_width (pattern_tile); + pattern_height = gdk_pixbuf_get_height (pattern_tile); + + pixbuf = gdk_pixbuf_copy (frame); + /* scale the pattern tile to the proper size */ - pixbuf = gdk_pixbuf_scale_simple (pattern_tile, frame_width, frame_height, GDK_INTERP_BILINEAR); - - /* composite the mask on top of it */ - gdk_pixbuf_composite (frame, pixbuf, 0, 0, frame_width, frame_height, - 0.0, 0.0, 1.0, 1.0, GDK_INTERP_BILINEAR, 255); + gdk_pixbuf_scale (pattern_tile, + pixbuf, + 2, 2, frame_width - 8, frame_height - 8, + 0, 0, + (double)(frame_width - 8 + 1)/pattern_width, + (double)(frame_height - 8 + 1)/pattern_height, + GDK_INTERP_BILINEAR); /* if we're dragging, get rid of the light-colored halo */ if (dragging) { - temp_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, frame_width - 6, frame_height - 6); - gdk_pixbuf_copy_area (pixbuf, 2, 2, frame_width - 6, frame_height - 6, temp_pixbuf, 0, 0); + temp_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, frame_width - 8, frame_height - 8); + gdk_pixbuf_copy_area (pixbuf, 2, 2, frame_width - 8, frame_height - 8, temp_pixbuf, 0, 0); g_object_unref (pixbuf); pixbuf = temp_pixbuf; } |