Nicer Insensitive Stock Icons [gtkstyle.c.patch]



Attached is a patch which composites a stock image & the insensitive bg
color, making a nicer-looking insensitive stock image than the current
darkened-stippled one. It's against GTK+ 2.0 CVS.

    Jim Cape
    http://www.ignore-your.tv

    "No cause, no God, no abstract idea can justify the mass
     slaughter of innocents."
        -- Edward Said

--- gtk/gtkstyle.c	Thu Jan  3 14:59:04 2002
+++ gtk/gtkstyle.c	Thu Jan  3 14:59:44 2002
@@ -1684,10 +1684,14 @@
     {
       if (state == GTK_STATE_INSENSITIVE)
         {
-          stated = gdk_pixbuf_copy (scaled);      
-          
-          gdk_pixbuf_saturate_and_pixelate (scaled, stated,
-                                            0.8, TRUE);
+          stated =
+              gdk_pixbuf_composite_color_simple (scaled,
+                  gdk_pixbuf_get_width (scaled),
+                  gdk_pixbuf_get_height (scaled),
+                  GDK_INTERP_BILINEAR, 128,
+                  gdk_pixbuf_get_width (scaled),
+                  style->bg[state].pixel,
+                  style->bg[state].pixel);
           
           gdk_pixbuf_unref (scaled);
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]