[gnome-themes-standard] pane-separator: render background and frame with stock engine methods



commit cae928f4bf707dff8e6addc3da3f011cec2a5fca
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Apr 26 18:22:11 2011 -0400

    pane-separator: render background and frame with stock engine methods
    
    This makes it possible for themes to blend in the pane separator into
    the UI content if they want, and makes the code cleaner too.

 src/adwaita_engine.c                   |   16 +++++-----------
 themes/Adwaita/gtk-3.0/gtk-widgets.css |    6 +++---
 2 files changed, 8 insertions(+), 14 deletions(-)
---
diff --git a/src/adwaita_engine.c b/src/adwaita_engine.c
index 482d473..883a61a 100644
--- a/src/adwaita_engine.c
+++ b/src/adwaita_engine.c
@@ -1491,25 +1491,19 @@ adwaita_engine_render_handle (GtkThemingEngine *engine,
 
 		cairo_restore (cr);
 	} else if (gtk_theming_engine_has_class (engine, GTK_STYLE_CLASS_PANE_SEPARATOR)) {
-		GdkRGBA bg, fg;
+		GdkRGBA fg;
 		GtkStateFlags state;
 		gdouble xx, yy;
 
 		state = gtk_theming_engine_get_state (engine);
-		gtk_theming_engine_get_background_color (engine, state, &bg);
 		gtk_theming_engine_get_color (engine, state, &fg);
 
-		cairo_save (cr);
-
-		cairo_rectangle (cr, x, y,
-				 width, height);
-		gdk_cairo_set_source_rgba (cr, &bg);
-		cairo_fill (cr);
+		GTK_THEMING_ENGINE_CLASS (adwaita_engine_parent_class)->render_background (engine, cr, x, y, width, height);
+		GTK_THEMING_ENGINE_CLASS (adwaita_engine_parent_class)->render_frame (engine, cr, x, y, width, height);
 
-		gdk_cairo_set_source_rgba (cr, &fg);
+		cairo_save (cr);
 		cairo_set_line_width (cr, 2.0);
-		cairo_line_to (cr, x + width, y + height);
-		cairo_stroke (cr);
+		gdk_cairo_set_source_rgba (cr, &fg);
 
 		if (width > height) {
 			for (xx = x + width / 2 - 12; xx <= x + width / 2 + 12; xx += 6) {
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index 63ca043..1d82c50 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -98,14 +98,14 @@
 }
 
 .pane-separator {
-    background-color: @theme_bg_color;
+    border-style: none;
+    border-width: 0;
     color: shade (@inactive_frame_color, 0.80);
 }
 
 .pane-separator:prelight,
 .pane-separator:selected {
-    background-color: @theme_bg_color;
-    border-color: shade (@highlighted_border, 0.964);
+    color: shade (@inactive_frame_color, 0.60);
 }
 
 /****************



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