[gnome-themes-standard] pane-separator: theme pane-separators



commit b35910472708645ab7071075f32f9f492ded5ace
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Mar 14 09:41:19 2011 -0400

    pane-separator: theme pane-separators

 src/adwaita_engine.c           |   42 +++++++++++++++++++++++++++++++++++++--
 themes/Adwaita/gtk-3.0/gtk.css |   13 +++++++++++-
 2 files changed, 51 insertions(+), 4 deletions(-)
---
diff --git a/src/adwaita_engine.c b/src/adwaita_engine.c
index d295145..7d152d8 100644
--- a/src/adwaita_engine.c
+++ b/src/adwaita_engine.c
@@ -1362,9 +1362,45 @@ adwaita_engine_render_handle (GtkThemingEngine *engine,
 		}
 
 		cairo_restore (cr);
-	}
-	else
-	{
+	} else if (gtk_theming_engine_has_class (engine, GTK_STYLE_CLASS_PANE_SEPARATOR)) {
+		GdkRGBA bg, 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);
+
+		gdk_cairo_set_source_rgba (cr, &fg);
+		cairo_set_line_width (cr, 2.0);
+		cairo_line_to (cr, x + width, y + height);
+		cairo_stroke (cr);
+
+		if (width > height) {
+			for (xx = x + width / 2 - 12; xx <= x + width / 2 + 12; xx += 6) {
+				cairo_arc (cr, xx, y + height / 2 - 1,
+					   1.5,
+					   0, G_PI * 2.0);
+				cairo_fill (cr);
+			}
+		} else {
+			for (yy = y + height / 2 - 12; yy <= y + height / 2 + 12; yy += 6) {
+				cairo_arc (cr, x + width / 2.0, yy,
+					   1.0,
+					   0, G_PI * 2.0);
+				cairo_fill (cr);
+			}
+		}
+
+		cairo_restore (cr);
+	} else {
 		GTK_THEMING_ENGINE_CLASS (adwaita_engine_parent_class)->render_handle (engine, cr,
 										       x, y, width, height);
 	}
diff --git a/themes/Adwaita/gtk-3.0/gtk.css b/themes/Adwaita/gtk-3.0/gtk.css
index c6a6e24..9a7c4a2 100644
--- a/themes/Adwaita/gtk-3.0/gtk.css
+++ b/themes/Adwaita/gtk-3.0/gtk.css
@@ -96,7 +96,7 @@
 
     -GtkTextView-error-underline-color: @error_color;
 
-    -GtkPaned-handle-size: 6;
+    -GtkPaned-handle-size: 5;
 
     -GtkCheckButton-indicator-size: 16;
     -GtkCheckMenuItem-indicator-size: 12;
@@ -191,6 +191,17 @@
     background-color: shade (@inactive_frame_color, 0.93);
 }
 
+.pane-separator {
+    background-color: @theme_bg_color;
+    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);
+}
+
 /****************
  * Text Entries *
  ****************/



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