[gtk+] themingengine: don't hardcode white to draw insensitive labels shadow
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] themingengine: don't hardcode white to draw insensitive labels shadow
- Date: Mon, 21 Mar 2011 15:01:01 +0000 (UTC)
commit 1876823ef0f1c25e7308b564ecd72da995006d92
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Mar 21 10:53:12 2011 -0400
themingengine: don't hardcode white to draw insensitive labels shadow
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 | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index df09426..6f5994d 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]