[murrine] Indents and fixes to the RGBA separator



commit 345ca3400268a10f2bc97955b56e1fd63c598539
Author: Andrea <andrea cimitan gmail com>
Date:   Thu Mar 18 20:37:39 2010 +0100

    Indents and fixes to the RGBA separator

 src/murrine_draw.c      |   28 ++++++++++++++--------------
 src/murrine_draw_rgba.c |   35 +++++++++++++++++------------------
 2 files changed, 31 insertions(+), 32 deletions(-)
---
diff --git a/src/murrine_draw.c b/src/murrine_draw.c
index 47e2fbf..5f37e5f 100644
--- a/src/murrine_draw.c
+++ b/src/murrine_draw.c
@@ -1390,7 +1390,7 @@ murrine_draw_separator (cairo_t *cr,
 
 	if (separator->horizontal)
 	{
-		cairo_translate       (cr, x, y+0.5);
+		cairo_translate (cr, x, y+0.5);
 
 		switch (separator->style)
 		{
@@ -1412,9 +1412,9 @@ murrine_draw_separator (cairo_t *cr,
 			}
 		}
 		
-		cairo_move_to         (cr, 0.0,     0.0);
-		cairo_line_to         (cr, width+1, 0.0);
-		cairo_stroke          (cr);
+		cairo_move_to (cr, 0.0,     0.0);
+		cairo_line_to (cr, width+1, 0.0);
+		cairo_stroke  (cr);
 
 		switch (separator->style)
 		{
@@ -1436,13 +1436,13 @@ murrine_draw_separator (cairo_t *cr,
 			}
 		}
 
-		cairo_move_to         (cr, 0.0,   1.0);
-		cairo_line_to         (cr, width, 1.0);
-		cairo_stroke          (cr);
+		cairo_move_to (cr, 0.0,   1.0);
+		cairo_line_to (cr, width, 1.0);
+		cairo_stroke  (cr);
 	}
 	else
 	{
-		cairo_translate       (cr, x+0.5, y);
+		cairo_translate (cr, x+0.5, y);
 
 		switch (separator->style)
 		{
@@ -1463,9 +1463,9 @@ murrine_draw_separator (cairo_t *cr,
 				break;
 			}
 		}
-		cairo_move_to         (cr, 0.0, 0.0);
-		cairo_line_to         (cr, 0.0, height);
-		cairo_stroke          (cr);
+		cairo_move_to (cr, 0.0, 0.0);
+		cairo_line_to (cr, 0.0, height);
+		cairo_stroke  (cr);
 
 		switch (separator->style)
 		{
@@ -1487,9 +1487,9 @@ murrine_draw_separator (cairo_t *cr,
 			}
 		}
 
-		cairo_move_to         (cr, 1.0, 0.0);
-		cairo_line_to         (cr, 1.0, height);
-		cairo_stroke          (cr);
+		cairo_move_to (cr, 1.0, 0.0);
+		cairo_line_to (cr, 1.0, height);
+		cairo_stroke  (cr);
 	}
 }
 
diff --git a/src/murrine_draw_rgba.c b/src/murrine_draw_rgba.c
index 4816fb6..c9d7ccc 100644
--- a/src/murrine_draw_rgba.c
+++ b/src/murrine_draw_rgba.c
@@ -1013,14 +1013,11 @@ murrine_rgba_draw_separator (cairo_t *cr,
 	{
 		cairo_translate (cr, x, y+0.5);
 
-		cairo_move_to (cr, 0.0,     0.0);
-		cairo_line_to (cr, width+1, 0.0);
 		switch (separator->style)
 		{
 			default:
 			case 0:
 				murrine_set_color_rgb (cr, dark);
-				cairo_stroke (cr);
 				break;
 			case 1:
 			{
@@ -1031,20 +1028,20 @@ murrine_rgba_draw_separator (cairo_t *cr,
 				murrine_pattern_add_color_stop_rgba (pat, 0.75, dark, 1.0);
 				murrine_pattern_add_color_stop_rgba (pat, 1.00, dark, 0.0);
 				cairo_set_source (cr, pat);
-				cairo_stroke (cr);
 				cairo_pattern_destroy (pat);
 				break;
 			}
 		}
 		
-		cairo_move_to (cr, 0.0,   1.0);
-		cairo_line_to (cr, width, 1.0);
+		cairo_move_to (cr, 0.0,     0.0);
+		cairo_line_to (cr, width+1, 0.0);
+		cairo_stroke  (cr);
+
 		switch (separator->style)
 		{
 			default:
 			case 0:
 				murrine_set_color_rgba (cr, highlight, 0.5);
-				cairo_stroke (cr);
 				break;
 			case 1:
 			{
@@ -1055,63 +1052,65 @@ murrine_rgba_draw_separator (cairo_t *cr,
 				murrine_pattern_add_color_stop_rgba (pat, 0.75, highlight, 0.5);
 				murrine_pattern_add_color_stop_rgba (pat, 1.00, highlight, 0.0);
 				cairo_set_source (cr, pat);
-				cairo_stroke (cr);
 				cairo_pattern_destroy (pat);
 				break;
 			}
 		}
+
+		cairo_move_to (cr, 0.0,   1.0);
+		cairo_line_to (cr, width, 1.0);
+		cairo_stroke  (cr);
 	}
 	else
 	{
 		cairo_translate (cr, x+0.5, y);
 
-		cairo_move_to (cr, 0.0, 0.0);
-		cairo_line_to (cr, 0.0, height);
 		switch (separator->style)
 		{
 			default:
 			case 0:
 				murrine_set_color_rgb (cr, dark);
-				cairo_stroke (cr);
 				break;
 			case 1:
 			{
 				cairo_pattern_t *pat;
-				pat = cairo_pattern_create_linear (0, 0, width, 0);
+				pat = cairo_pattern_create_linear (0, 0, 0, height);
 				murrine_pattern_add_color_stop_rgba (pat, 0.00, dark, 0.0);
 				murrine_pattern_add_color_stop_rgba (pat, 0.25, dark, 1.0);
 				murrine_pattern_add_color_stop_rgba (pat, 0.75, dark, 1.0);
 				murrine_pattern_add_color_stop_rgba (pat, 1.00, dark, 0.0);
 				cairo_set_source (cr, pat);
-				cairo_stroke (cr);
 				cairo_pattern_destroy (pat);
 				break;
 			}
 		}
+		cairo_move_to (cr, 0.0, 0.0);
+		cairo_line_to (cr, 0.0, height);
+		cairo_stroke  (cr);
 
-		cairo_move_to (cr, 1.0, 0.0);
-		cairo_line_to (cr, 1.0, height);
 		switch (separator->style)
 		{
 			default:
 			case 0:
 				murrine_set_color_rgba (cr, highlight, 0.5);
-				cairo_stroke (cr);
 				break;
 			case 1:
 			{
 				cairo_pattern_t *pat;
-				pat = cairo_pattern_create_linear (0, 0, width, 0);
+				pat = cairo_pattern_create_linear (0, 0, 0, height);
 				murrine_pattern_add_color_stop_rgba (pat, 0.00, highlight, 0.0);
 				murrine_pattern_add_color_stop_rgba (pat, 0.25, highlight, 0.5);
 				murrine_pattern_add_color_stop_rgba (pat, 0.75, highlight, 0.5);
 				murrine_pattern_add_color_stop_rgba (pat, 1.00, highlight, 0.0);
 				cairo_set_source (cr, pat);
-				cairo_stroke (cr);
 				cairo_pattern_destroy (pat);
 				break;
 			}
 		}
+
+		cairo_move_to (cr, 1.0, 0.0);
+		cairo_line_to (cr, 1.0, height);
+		cairo_stroke  (cr);
 	}
 }
 



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