[murrine/border-shade] Finished theming expanders: suggested size = 13



commit 0b92a03289e25d962c0eddda632337835a1db4d2
Author: Andrea Cimitan <andrea cimitan gmail com>
Date:   Tue Sep 15 19:48:35 2009 +0200

    	Finished theming expanders: suggested size = 13

 src/murrine_style.c |   40 ++++++++++++++++++++++++++--------------
 1 files changed, 26 insertions(+), 14 deletions(-)
---
diff --git a/src/murrine_style.c b/src/murrine_style.c
index 2b8a87b..580a610 100644
--- a/src/murrine_style.c
+++ b/src/murrine_style.c
@@ -1825,38 +1825,50 @@ murrine_style_draw_expander (GtkStyle        *style,
 		gtk_widget_style_get (widget, "expander-size", &expander_size, NULL);
 	}
 	else
-		expander_size = 12;
+		expander_size = 13;
+
+	if (expander_size %2 == 0)
+		expander_size--;
 
 	cairo_translate (cr, x-expander_size/2, y-expander_size/2);
 
-	murrine_rounded_rectangle_closed (cr, 0.5, 0.5, expander_size-1, expander_size-1, params.roundness, params.corners);
-	murrine_set_color_rgb (cr, &colors->shade[0]);
-	cairo_fill_preserve (cr);
+	cairo_save (cr);
+
+	murrine_rounded_rectangle_closed (cr, 1, 1, expander_size-2, expander_size-2, params.roundness, params.corners);
+	cairo_clip_preserve (cr);
+
+	murrine_draw_glaze (cr, &colors->bg[state_type],
+	                    params.glow_shade, params.highlight_shade, params.lightborder_shade,
+	                    params.mrn_gradient, &params, 1, 1, expander_size-2, expander_size-2,
+	                    params.roundness, params.corners, TRUE);
+
+	cairo_restore (cr);
+
+	murrine_rounded_rectangle (cr, 0.5, 0.5, expander_size-1, expander_size-1, params.roundness, params.corners);
 	murrine_set_color_rgb (cr, &colors->shade[4]);
 	cairo_stroke (cr);
 
-	murrine_set_color_rgb  (cr, &colors->fg[state_type]);
 	switch (expander_style)
 	{
 		case GTK_EXPANDER_SEMI_COLLAPSED:
 		case GTK_EXPANDER_COLLAPSED:
-			cairo_move_to (cr, (double)expander_size/4, (double)expander_size/2);
-			cairo_line_to (cr, expander_size-(double)expander_size/4, (double)expander_size/2);
-			cairo_stroke (cr);
-			cairo_move_to (cr, (double)expander_size/2, (double)expander_size/4);
-			cairo_line_to (cr, (double)expander_size/2, expander_size-(double)expander_size/4);
-			cairo_stroke (cr);
+			cairo_move_to (cr, (double)expander_size/2-(double)expander_size/4+0.5, (double)expander_size/2);
+			cairo_line_to (cr, (double)expander_size/2+(double)expander_size/4-0.5, (double)expander_size/2);
+			cairo_move_to (cr, (double)expander_size/2, (double)expander_size/2-(double)expander_size/4+0.5);
+			cairo_line_to (cr, (double)expander_size/2, (double)expander_size/2+(double)expander_size/4-0.5);
 		break;
 		case GTK_EXPANDER_SEMI_EXPANDED:
 		case GTK_EXPANDER_EXPANDED:
-			cairo_move_to (cr, (double)expander_size/4, (double)expander_size/2);
-			cairo_line_to (cr, expander_size-(double)expander_size/4, (double)expander_size/2);
-			cairo_stroke (cr);
+			cairo_move_to (cr, (double)expander_size/2-(double)expander_size/4+0.5, (double)expander_size/2);
+			cairo_line_to (cr, (double)expander_size/2+(double)expander_size/4-0.5, (double)expander_size/2);
 		break;
 		default:
 			g_assert_not_reached ();
 	}
 
+	murrine_set_color_rgb  (cr, &colors->fg[state_type]);
+	cairo_stroke (cr);
+
 	cairo_destroy (cr);
 }
 



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