[gtk-theme-engine-clearlooks/gtk-style-context] Handle focus fill in buttons.



commit a50d94624bde89638c061e280a1d6e1a7c9c2230
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Nov 30 02:58:13 2010 +0100

    Handle focus fill in buttons.

 src/clearlooks_draw.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/clearlooks_draw.c b/src/clearlooks_draw.c
index 99d5337..4125a41 100644
--- a/src/clearlooks_draw.c
+++ b/src/clearlooks_draw.c
@@ -2786,6 +2786,10 @@ clearlooks_draw_focus (cairo_t *cr,
                        const FocusParameters  *focus,
                        int x, int y, int width, int height)
 {
+	const GtkWidgetPath *path;
+
+	path = gtk_theming_engine_get_path (engine);
+
 	if (focus->has_color)
 		ge_cairo_set_color (cr, &focus->color);
 	else if (focus->type == CL_FOCUS_COLOR_WHEEL_LIGHT)
@@ -2835,11 +2839,10 @@ clearlooks_draw_focus (cairo_t *cr,
 	                 width - focus->line_width, height - focus->line_width);
 	cairo_stroke_preserve (cr);
 
-        if (focus->type == CL_FOCUS_BUTTON &&
-            focus->has_fill_color) {
-                ge_cairo_set_color (cr, &focus->fill_color);
-                cairo_fill (cr);
-        }
+	if (gtk_widget_path_is_type (path, GTK_TYPE_BUTTON)) {
+		ge_cairo_set_color (cr, &focus->fill_color);
+		cairo_fill (cr);
+	}
 }
 
 void



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