[murrine] Fixed menubar and toolbar with border_colors



commit b4eefe0a8f5f01d26f9db7f920e45d4d50a06011
Author: Andrea Cimitan <andrea cimitan gmail com>
Date:   Tue Dec 8 01:04:34 2009 +0100

    Fixed menubar and toolbar with border_colors

 src/murrine_draw.c      |   15 +++++++++++----
 src/murrine_draw_rgba.c |   13 ++++++++++---
 2 files changed, 21 insertions(+), 7 deletions(-)
---
diff --git a/src/murrine_draw.c b/src/murrine_draw.c
index 5b9b225..e938140 100644
--- a/src/murrine_draw.c
+++ b/src/murrine_draw.c
@@ -884,6 +884,10 @@ murrine_draw_menubar (cairo_t *cr,
                       int menubarstyle)
 {
 	const MurrineRGB *fill = &colors->bg[0];
+	MurrineRGB dark = colors->shade[3];
+
+	if(widget->mrn_gradient.has_border_colors)
+		dark = widget->mrn_gradient.border_colors[1];
 
 	cairo_translate (cr, x, y);
 	cairo_rectangle (cr, 0, 0, width, height);
@@ -955,7 +959,7 @@ murrine_draw_menubar (cairo_t *cr,
 		cairo_move_to        (cr, 0, height-0.5);
 		cairo_line_to        (cr, width, height-0.5);
 	}
-	murrine_set_color_rgb (cr, &colors->shade[3]);
+	murrine_set_color_rgb (cr, &dark);
 	cairo_stroke          (cr);
 }
 
@@ -968,9 +972,12 @@ murrine_draw_toolbar (cairo_t *cr,
                       const ToolbarParameters *toolbar,
                       int x, int y, int width, int height)
 {
-	const MurrineRGB *dark = &colors->shade[3];
 	const MurrineRGB *fill = &colors->bg[0];
 	const MurrineRGB *top  = &colors->shade[0];
+	MurrineRGB dark = colors->shade[3];
+
+	if(widget->mrn_gradient.has_border_colors)
+		dark = widget->mrn_gradient.border_colors[1];
 
 	cairo_translate      (cr, x, y);
 	cairo_rectangle (cr, 0, 0, width, height);
@@ -1026,7 +1033,7 @@ murrine_draw_toolbar (cairo_t *cr,
 	}
 
 	/* Draw shadow */
-	murrine_set_color_rgb (cr, dark);
+	murrine_set_color_rgb (cr, &dark);
 	if (toolbar->style == 1 && widget->glazestyle == 2)
 		cairo_rectangle (cr, 0.5, 0.5, width-1, height-1);
 	else
@@ -1034,7 +1041,7 @@ murrine_draw_toolbar (cairo_t *cr,
 		cairo_move_to         (cr, 0, height-0.5);
 		cairo_line_to         (cr, width, height-0.5);
 	}
-	cairo_stroke          (cr);
+	cairo_stroke (cr);
 }
 
 static void
diff --git a/src/murrine_draw_rgba.c b/src/murrine_draw_rgba.c
index f4d420a..d032721 100644
--- a/src/murrine_draw_rgba.c
+++ b/src/murrine_draw_rgba.c
@@ -682,6 +682,10 @@ murrine_rgba_draw_menubar (cairo_t *cr,
                            int menubarstyle)
 {
 	const MurrineRGB *fill = &colors->bg[0];
+	MurrineRGB dark = colors->shade[4];
+
+	if(widget->mrn_gradient.has_border_colors)
+		dark = widget->mrn_gradient.border_colors[1];
 
 	cairo_translate (cr, x, y);
 	cairo_rectangle (cr, 0, 0, width, height);
@@ -772,7 +776,7 @@ murrine_rgba_draw_menubar (cairo_t *cr,
 		cairo_line_to        (cr, width, height-0.5);
 	}
 
-	murrine_set_color_rgb (cr, &colors->shade[4]);
+	murrine_set_color_rgb (cr, &dark);
 	cairo_stroke          (cr);
 }
 
@@ -783,9 +787,12 @@ murrine_rgba_draw_toolbar (cairo_t *cr,
                            const ToolbarParameters *toolbar,
                            int x, int y, int width, int height)
 {
-	const MurrineRGB *dark = &colors->shade[4];
 	const MurrineRGB *fill = &colors->bg[0];
 	const MurrineRGB *top  = &colors->shade[0];
+	MurrineRGB dark = colors->shade[4];
+
+	if(widget->mrn_gradient.has_border_colors)
+		dark = widget->mrn_gradient.border_colors[1];
 
 	cairo_translate (cr, x, y);
 	cairo_rectangle (cr, 0, 0, width, height);
@@ -849,7 +856,7 @@ murrine_rgba_draw_toolbar (cairo_t *cr,
 	}
 
 	/* Draw shadow */
-	murrine_set_color_rgb (cr, dark);
+	murrine_set_color_rgb (cr, &dark);
 	/* Draw bottom line */
 	if (toolbar->style == 1 && widget->glazestyle == 2)
 		cairo_rectangle (cr, 0.5, 0.5, width-1, height-1);



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