]> Pileus Git - ~andy/gtk/commitdiff
themingengine: don't hardcode white to draw insensitive labels shadow
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 21 Mar 2011 14:53:12 +0000 (10:53 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 21 Mar 2011 15:00:53 +0000 (11:00 -0400)
Use the background color instead.
I think the optimal solution would be delegating the shadow rendering to
the theme completely, and removing this in GtkThemingEngine, but for
now, this simple fix makes the dark variant more usable.

https://bugzilla.gnome.org/show_bug.cgi?id=645405

gtk/gtkthemingengine.c

index df09426abeb52eb8ddb28ba7991b5821c540fada..6f5994d83ee8980c553505a01549f7c47370b003 100644 (file)
@@ -2402,8 +2402,14 @@ gtk_theming_engine_render_layout (GtkThemingEngine *engine,
 
   if (flags & GTK_STATE_FLAG_INSENSITIVE)
     {
+      GdkRGBA bg;
+
+      gtk_theming_engine_get_background_color (engine, flags, &bg);
+
       cairo_save (cr);
-      cairo_set_source_rgb (cr, 1, 1, 1);
+
+      gdk_cairo_set_source_rgba (cr, &bg);
+
       cairo_move_to (cr, x + 1, y + 1);
       _gtk_pango_fill_layout (cr, layout);
       cairo_restore (cr);