[gtk-theme-engine-clearlooks/gtk-style-context] gnome3: Use border color when drawing entries.



commit b9d57780df0663af0c8217c6b821e31e81d3c712
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Nov 30 02:59:18 2010 +0100

    gnome3: Use border color when drawing entries.

 src/clearlooks_draw_gnome3.c |   40 +++++++++++++++++++++-------------------
 1 files changed, 21 insertions(+), 19 deletions(-)
---
diff --git a/src/clearlooks_draw_gnome3.c b/src/clearlooks_draw_gnome3.c
index 04df4ae..04d9826 100644
--- a/src/clearlooks_draw_gnome3.c
+++ b/src/clearlooks_draw_gnome3.c
@@ -38,24 +38,25 @@ clearlooks_gnome3_draw_entry (cairo_t *cr,
 	                      const FocusParameters  *focus,
 	                      int x, int y, int width, int height)
 {
-        CairoColor *bg_color, *fg_color;
-        const CairoColor *top_color;
-        GtkStateFlags state;
-        gint radius;
-
-        state = gtk_theming_engine_get_state (engine);
-        gtk_theming_engine_get (engine, state,
-                                "border-radius", &radius,
-                                "background-color", &bg_color,
-                                "color", &fg_color,
-                                NULL);
-
-        if (state & GTK_STATE_FLAG_FOCUSED) {
-                gdk_rgba_free ((GdkRGBA *) fg_color);
-
-                gtk_theming_engine_get (engine, GTK_STATE_FLAG_SELECTED,
-                                        "color", fg_color,
-                                        NULL);
+	CairoColor *bg_color, *fg_color, *border_color;
+	const CairoColor *top_color;
+	GtkStateFlags state;
+	gint radius;
+
+	state = gtk_theming_engine_get_state (engine);
+	gtk_theming_engine_get (engine, state,
+				"border-radius", &radius,
+				"background-color", &bg_color,
+				"border-color", &border_color,
+				"color", &fg_color,
+				NULL);
+
+	if (state & GTK_STATE_FLAG_FOCUSED) {
+		gdk_rgba_free ((GdkRGBA *) fg_color);
+
+		gtk_theming_engine_get (engine, GTK_STATE_FLAG_SELECTED,
+					"color", fg_color,
+					NULL);
 	}
 
 	top_color = fg_color;
@@ -72,7 +73,7 @@ clearlooks_gnome3_draw_entry (cairo_t *cr,
             (state & GTK_STATE_FLAG_INSENSITIVE) ||
             (state & GTK_STATE_FLAG_PRELIGHT) ||
             (state & GTK_STATE_FLAG_ACTIVE)) {
-		ge_cairo_set_color (cr, fg_color);
+		ge_cairo_set_color (cr, border_color);
 		cairo_stroke (cr);
 	} else {
 		cairo_pattern_t *pattern;
@@ -119,6 +120,7 @@ clearlooks_gnome3_draw_entry (cairo_t *cr,
 
         gdk_rgba_free ((GdkRGBA *) fg_color);
         gdk_rgba_free ((GdkRGBA *) bg_color);
+        gdk_rgba_free ((GdkRGBA *) border_color);
 }
 
 static void



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