[murrine/border-shade-and-expander] using border_shades, same behaviour of gradient_shades but with 2 doubles



commit 7a7177c9a15f7074dae70ec16c5b35f1cf28222c
Author: Andrea Cimitan <andrea cimitan gmail com>
Date:   Mon Oct 26 14:00:28 2009 +0100

    using border_shades, same behaviour of gradient_shades but with 2 doubles

 src/cairo-support.c    |   25 ++++++++-------
 src/cairo-support.h    |    4 +-
 src/murrine_draw.c     |   79 ++++++++++++++++++++++++++++++++++--------------
 src/murrine_rc_style.c |   60 +++++++++++++++++++++++++++++++-----
 src/murrine_rc_style.h |    4 +-
 src/murrine_style.c    |   13 ++++++--
 src/murrine_style.h    |    2 +-
 src/murrine_types.h    |    2 +-
 8 files changed, 137 insertions(+), 52 deletions(-)
---
diff --git a/src/cairo-support.c b/src/cairo-support.c
index 8488ab9..fd1706e 100644
--- a/src/cairo-support.c
+++ b/src/cairo-support.c
@@ -810,16 +810,16 @@ murrine_draw_border (cairo_t *cr,
                      const MurrineRGB  *color,
                      double x, double y, double width, double height,
                      int roundness, uint8 corners,
-                     double highlight_shade, double alpha)
+                     MurrineGradients mrn_gradient, double alpha)
 {
-	if (highlight_shade != 1.0)
+	if (mrn_gradient.border_shades[0] != 1.0 ||
+	    mrn_gradient.border_shades[1] != 1.0) // improve
 	{
 		cairo_pattern_t *pat;
 		MurrineRGB shade1, shade2;
 
-		//warning, only accepts hightlight_shade < 2
-		murrine_shade (color, 2.0-highlight_shade, &shade1);
-		murrine_shade (color, highlight_shade, &shade2);
+		murrine_shade (color, mrn_gradient.border_shades[0], &shade1);
+		murrine_shade (color, mrn_gradient.border_shades[1], &shade2);
 
 		pat = cairo_pattern_create_linear (x, y, x, height+y);
 		murrine_pattern_add_color_stop_rgba (pat, 0.00, &shade1, alpha);
@@ -841,23 +841,24 @@ murrine_draw_shadow (cairo_t *cr,
                      double x, double y, double width, double height,
                      int roundness, uint8 corners,
                      int reliefstyle,
-                     double highlight_shade, double alpha)
+                     MurrineGradients mrn_gradient, double alpha)
 {
-	if (highlight_shade != 1.0 || reliefstyle > 2)
+	if (mrn_gradient.border_shades[0] != 1.0 ||
+	    mrn_gradient.border_shades[1] != 1.0 ||
+	    reliefstyle > 2) // improve
 	{
 		cairo_pattern_t *pat;
 		MurrineRGB shade1, shade2;
 
-		//warning, only accepts hightlight_shade < 2
-		murrine_shade (color, 2.0-highlight_shade, &shade1);
-		murrine_shade (color, highlight_shade, &shade2);
+		murrine_shade (color, mrn_gradient.border_shades[0], &shade1);
+		murrine_shade (color, mrn_gradient.border_shades[1], &shade2);
 
 		pat = cairo_pattern_create_linear (x, y, x, height+y);
 		murrine_pattern_add_color_stop_rgba (pat, 0.00, &shade1, alpha);
 		murrine_pattern_add_color_stop_rgba (pat, 1.00, &shade2,
 		                                     alpha*(reliefstyle > 2 ?
-		                                            (highlight_shade > 1.0 ?
-		                                             2.5 : 2.0) : 1.0));
+		                                            (mrn_gradient.border_shades[1] > 1.0 ?
+		                                             2.5 : 2.0) : 1.0)); //improve
 
 		cairo_set_source (cr, pat);
 		cairo_pattern_destroy (pat);
diff --git a/src/cairo-support.h b/src/cairo-support.h
index 2f5fef8..1059062 100644
--- a/src/cairo-support.h
+++ b/src/cairo-support.h
@@ -97,14 +97,14 @@ G_GNUC_INTERNAL void murrine_draw_border (cairo_t *cr,
                                           const MurrineRGB  *color,
                                           double x, double y, double width, double height,
                                           int roundness, uint8 corners,
-                                          double highlight_shade, double alpha);
+                                          MurrineGradients mrn_gradient, double alpha);
 
 G_GNUC_INTERNAL void murrine_draw_shadow (cairo_t *cr,
                                           const MurrineRGB  *color,
                                           double x, double y, double width, double height,
                                           int roundness, uint8 corners,
                                           int reliefstyle,
-                                          double highlight_shade, double alpha);
+                                          MurrineGradients mrn_gradient, double alpha);
 
 G_GNUC_INTERNAL void murrine_draw_glaze (cairo_t *cr,
                                          const MurrineRGB *fill,
diff --git a/src/murrine_draw.c b/src/murrine_draw.c
index 8e4b338..4c25fce 100644
--- a/src/murrine_draw.c
+++ b/src/murrine_draw.c
@@ -149,18 +149,19 @@ murrine_draw_button (cairo_t *cr,
 {
 	double xos = widget->xthickness > 2 ? 1 : 0;
 	double yos = widget->ythickness > 2 ? 1 : 0;
-	double border_shade_custom = widget->border_shade;
 	double glow_shade_custom = widget->glow_shade;
 	double highlight_shade_custom = widget->highlight_shade;
 	double lightborder_shade_custom = widget->lightborder_shade;
 	MurrineRGB fill = colors->bg[widget->state_type];
 	MurrineRGB border = colors->shade[!widget->disabled ? 6 : 5];
 	MurrineGradients mrn_gradient_custom = widget->mrn_gradient;
+;
 
 	if (widget->disabled)
 	{
 		mrn_gradient_custom = get_decreased_gradient_shades (widget->mrn_gradient, 3.0);
-		border_shade_custom = get_decreased_shade (widget->border_shade, 2.0);
+		mrn_gradient_custom.border_shades[0] = get_decreased_shade (widget->mrn_gradient.border_shades[0], 2.0);
+		mrn_gradient_custom.border_shades[1] = get_decreased_shade (widget->mrn_gradient.border_shades[1], 2.0);
 		glow_shade_custom = get_decreased_shade (widget->glow_shade, 2.0);
 		highlight_shade_custom = get_decreased_shade (widget->highlight_shade, 2.0);
 		lightborder_shade_custom = get_decreased_shade (widget->lightborder_shade, 2.0);
@@ -186,11 +187,12 @@ murrine_draw_button (cairo_t *cr,
 		                     xos-0.5, yos-0.5, width-(xos*2)+1, height-(yos*2)+1,
 		                     widget->roundness+1, widget->corners,
 		                     widget->reliefstyle,
-		                     border_shade_custom, 0.08);
+		                     mrn_gradient_custom, 0.08);
 	}
 	else if (widget->reliefstyle != 0 && xos >= 0.5 && yos >= 0.5)
 	{
-		border_shade_custom = get_inverted_shade (border_shade_custom);
+		mrn_gradient_custom.border_shades[0] = get_inverted_shade (mrn_gradient_custom.border_shades[0]);
+		mrn_gradient_custom.border_shades[1] = get_inverted_shade (mrn_gradient_custom.border_shades[1]);	
 		murrine_draw_inset (cr, &widget->parentbg, xos-0.5, yos-0.5,
 		                    width-(xos*2)+1, height-(yos*2)+1,
 		                    widget->roundness+1, widget->corners);
@@ -247,7 +249,7 @@ murrine_draw_button (cairo_t *cr,
 	murrine_draw_border (cr, &border,
 	                     xos+0.5, yos+0.5, width-(xos*2)-1, height-(yos*2)-1,
 	                     widget->roundness, widget->corners,
-	                     border_shade_custom, 1.0);
+	                     mrn_gradient_custom, 1.0);
 }
 
 static void
@@ -257,6 +259,7 @@ murrine_draw_entry (cairo_t *cr,
                     const FocusParameters  *focus,
                     int x, int y, int width, int height)
 {
+	MurrineGradients mrn_gradient_custom;
 	const MurrineRGB *base = &colors->base[widget->state_type];
 	MurrineRGB border = colors->shade[widget->disabled ? 4 : 6];
 	int radius = CLAMP (widget->roundness, 0, 3);
@@ -297,11 +300,14 @@ murrine_draw_entry (cairo_t *cr,
 		cairo_stroke (cr);
 	}
 
+	mrn_gradient_custom.border_shades[0] = get_inverted_shade (widget->mrn_gradient.border_shades[0]);
+	mrn_gradient_custom.border_shades[1] = get_inverted_shade (widget->mrn_gradient.border_shades[1]);	
+
 	/* Draw the border */
 	murrine_draw_border (cr, &border,
 	                     1, 1, width-3, height-3,
 	                     radius, widget->corners,
-	                     get_inverted_shade(widget->border_shade), 1.0);
+	                     mrn_gradient_custom, 1.0);
 }
 
 static void
@@ -708,7 +714,7 @@ murrine_draw_progressbar_fill (cairo_t *cr,
 	murrine_draw_border (cr, &border,
 	                     1.5, 0.5, width-3, height-1,
 	                     roundness, widget->corners,
-	                     widget->border_shade, 1.0);
+	                     widget->mrn_gradient, 1.0);
 
 	cairo_restore (cr);
 }
@@ -1422,7 +1428,7 @@ murrine_draw_menuitem (cairo_t *cr,
 	murrine_draw_border (cr, border,
 	                     0.5, 0.5, width-1, height-1,
 	                     widget->roundness, widget->corners,
-	                     widget->border_shade, 0.8);
+	                     widget->mrn_gradient, 0.8);
 }
 
 static void
@@ -1483,10 +1489,13 @@ murrine_draw_scrollbar_stepper (cairo_t *cr,
                                 const ScrollBarParameters *scrollbar,
                                 int x, int y, int width, int height)
 {
+	MurrineGradients mrn_gradient_custom;
 	const MurrineRGB *fill  = &colors->bg[widget->state_type];
 	MurrineRGB border;
 
 	murrine_shade (&colors->shade[6], 0.95, &border);
+	mrn_gradient_custom.border_shades[0] = 1.0;
+	mrn_gradient_custom.border_shades[1] = 1.0;
 
 	if (!scrollbar->horizontal)
 		murrine_exchange_axis (cr, &x, &y, &width, &height);
@@ -1511,7 +1520,7 @@ murrine_draw_scrollbar_stepper (cairo_t *cr,
 	murrine_draw_border (cr, &border,
 	                     0.5, 0.5, width-1, height-1,
 	                     widget->roundness, widget->corners,
-	                     1.0, 1.0);
+	                     mrn_gradient_custom, 1.0);
 }
 
 static void
@@ -1521,6 +1530,14 @@ murrine_draw_scrollbar_slider (cairo_t *cr,
                                const ScrollBarParameters *scrollbar,
                                int x, int y, int width, int height)
 {
+	MurrineGradients mrn_gradient_custom = widget->mrn_gradient;
+	MurrineRGB fill = scrollbar->has_color ? scrollbar->color : colors->bg[0];
+	MurrineRGB border;
+
+	murrine_shade (&colors->shade[6], 0.95, &border);
+	mrn_gradient_custom.border_shades[0] = 1.0;
+	mrn_gradient_custom.border_shades[1] = 1.0;
+
 	if (scrollbar->stepperstyle < 1)
 	{
 		if (scrollbar->junction & MRN_JUNCTION_BEGIN)
@@ -1545,12 +1562,6 @@ murrine_draw_scrollbar_slider (cairo_t *cr,
 		}
 	}
 
-	/* Set colors */
-	MurrineRGB fill = scrollbar->has_color ? scrollbar->color : colors->bg[0];
-	MurrineRGB border;
-
-	murrine_shade (&colors->shade[6], 0.95, &border);
-
 	if (widget->prelight)
 		murrine_shade (&fill, 1.04, &fill);
 
@@ -1574,7 +1585,7 @@ murrine_draw_scrollbar_slider (cairo_t *cr,
 
 	murrine_draw_glaze (cr, &fill,
 	                    widget->glow_shade, widget->highlight_shade, widget->lightborder_shade,
-	                    widget->mrn_gradient, widget, 1, 1, width-2, height-2,
+	                    mrn_gradient_custom, widget, 1, 1, width-2, height-2,
 	                    widget->roundness, widget->corners, TRUE);
 
 	/* Draw the options */
@@ -1663,7 +1674,7 @@ murrine_draw_scrollbar_slider (cairo_t *cr,
 	murrine_draw_border (cr, &border,
 	                     0.5, 0.5, width-1, height-1,
 	                     widget->roundness, widget->corners,
-	                     1.0, 1.0);
+	                     mrn_gradient_custom, 1.0);
 }
 
 static void
@@ -1992,7 +2003,7 @@ murrine_draw_radiobutton (cairo_t *cr,
 			                     0.5, 0.5, width-1, height-1,
 			                     roundness+1, widget->corners,
 			                     widget->reliefstyle,
-			                     widget->border_shade, 0.08);
+			                     mrn_gradient_custom, 0.08);
 		}
 		else if (widget->reliefstyle != 0)
 			murrine_draw_inset (cr, &widget->parentbg, 0.5, 0.5, width-1, height-1, roundness+1, widget->corners);
@@ -2005,6 +2016,8 @@ murrine_draw_radiobutton (cairo_t *cr,
 
 	if (draw_bullet)
 	{
+
+
 		murrine_draw_glaze (cr, bg,
 		                    widget->glow_shade, highlight_shade_custom, lightborder_shade_custom,
 		                    mrn_gradient_custom, widget, 2, 2, width-4, height-4,
@@ -2018,11 +2031,21 @@ murrine_draw_radiobutton (cairo_t *cr,
 
 	cairo_restore (cr);
 
+	if (checkbox->in_menu || checkbox->in_cell)
+	{
+		mrn_gradient_custom.border_shades[0] = 1.0;
+		mrn_gradient_custom.border_shades[1] = 1.0;
+	}
+	else if (draw_bullet)
+	{
+		mrn_gradient_custom.border_shades[0] = get_inverted_shade(mrn_gradient_custom.border_shades[0]);
+		mrn_gradient_custom.border_shades[1] = get_inverted_shade(mrn_gradient_custom.border_shades[1]);
+	}
+
 	murrine_draw_border (cr, border,
 	                     1.5, 1.5, width-3, height-3,
 	                     roundness, widget->corners,
-	                     checkbox->in_menu || checkbox->in_cell ? 1.0 : draw_bullet ?
-	                     widget->border_shade : get_inverted_shade(widget->border_shade), 1.0);
+	                     mrn_gradient_custom, 1.0);
 
 	if (draw_bullet)
 	{
@@ -2104,7 +2127,7 @@ murrine_draw_checkbox (cairo_t *cr,
 			                     0.5, 0.5, width-1, height-1,
 			                     roundness+1, widget->corners,
 			                     widget->reliefstyle,
-			                     widget->border_shade, 0.08);
+			                     mrn_gradient_custom, 0.08);
 		}
 		else if (widget->reliefstyle != 0)
 			murrine_draw_inset (cr, &widget->parentbg, 0.5, 0.5, width-1, height-1, roundness+1, widget->corners);
@@ -2130,11 +2153,21 @@ murrine_draw_checkbox (cairo_t *cr,
 
 	cairo_restore (cr);
 
+	if (checkbox->in_menu || checkbox->in_cell)
+	{
+		mrn_gradient_custom.border_shades[0] = 1.0;
+		mrn_gradient_custom.border_shades[1] = 1.0;
+	}
+	else if (draw_bullet)
+	{
+		mrn_gradient_custom.border_shades[0] = get_inverted_shade(mrn_gradient_custom.border_shades[0]);
+		mrn_gradient_custom.border_shades[1] = get_inverted_shade(mrn_gradient_custom.border_shades[1]);
+	}
+
 	murrine_draw_border (cr, border,
 	                     1.5, 1.5, width-3, height-3,
 	                     roundness, widget->corners,
-	                     checkbox->in_menu || checkbox->in_cell ? 1.0 : draw_bullet ?
-	                     widget->border_shade : get_inverted_shade(widget->border_shade), 1.0);
+	                     mrn_gradient_custom, 1.0);
 
 	if (draw_bullet)
 	{
diff --git a/src/murrine_rc_style.c b/src/murrine_rc_style.c
index be99180..90ab4d0 100644
--- a/src/murrine_rc_style.c
+++ b/src/murrine_rc_style.c
@@ -36,7 +36,7 @@ static void murrine_rc_style_merge (GtkRcStyle *dest,
 enum
 {
 	TOKEN_ANIMATION = G_TOKEN_LAST + 1,
-	TOKEN_BORDER_SHADE,
+	TOKEN_BORDER_SHADES,
 	TOKEN_COLORIZE_SCROLLBAR,
 	TOKEN_CONTRAST,
 	TOKEN_FOCUS_COLOR,
@@ -90,7 +90,7 @@ static struct
 theme_symbols[] =
 {
 	{ "animation",           TOKEN_ANIMATION },
-	{ "border_shade",        TOKEN_BORDER_SHADE },
+	{ "border_shades",       TOKEN_BORDER_SHADES },
 	{ "colorize_scrollbar",  TOKEN_COLORIZE_SCROLLBAR },
 	{ "contrast",            TOKEN_CONTRAST },
 	{ "focus_color",         TOKEN_FOCUS_COLOR },
@@ -150,7 +150,8 @@ murrine_rc_style_init (MurrineRcStyle *murrine_rc)
 	murrine_rc->flags = 0;
 
 	murrine_rc->animation = FALSE;
-	murrine_rc->border_shade = 1.0;
+	murrine_rc->border_shades[0] = 1.0;
+	murrine_rc->border_shades[1] = 1.0;
 	murrine_rc->colorize_scrollbar = TRUE;
 	murrine_rc->contrast = 1.0;
 	murrine_rc->has_focus_color = FALSE;
@@ -406,6 +407,46 @@ theme_parse_gradient (GtkSettings  *settings,
 }
 
 static guint
+theme_parse_border (GtkSettings  *settings,
+                    GScanner     *scanner,
+                    double       border_shades[2])
+{
+	guint               token;
+
+	/* Skip 'blah_border' */
+	token = g_scanner_get_next_token(scanner);
+
+	token = g_scanner_get_next_token(scanner);
+	if (token != G_TOKEN_EQUAL_SIGN)
+		return G_TOKEN_EQUAL_SIGN;
+
+	token = g_scanner_get_next_token(scanner);
+	if (token != G_TOKEN_LEFT_CURLY)
+		return G_TOKEN_LEFT_CURLY;
+
+	token = g_scanner_get_next_token(scanner);
+	if (token != G_TOKEN_FLOAT)
+		return G_TOKEN_FLOAT;
+	border_shades[0] = scanner->value.v_float;
+	token = g_scanner_get_next_token(scanner);
+	if (token != G_TOKEN_COMMA)
+		return G_TOKEN_COMMA;
+
+	token = g_scanner_get_next_token(scanner);
+	if (token != G_TOKEN_FLOAT)
+		return G_TOKEN_FLOAT;
+	border_shades[1] = scanner->value.v_float;
+
+	token = g_scanner_get_next_token(scanner);
+	if (token != G_TOKEN_RIGHT_CURLY)
+		return G_TOKEN_RIGHT_CURLY;
+
+	/* save those values */
+
+	return G_TOKEN_NONE;
+}
+
+static guint
 murrine_gtk2_rc_parse_dummy (GtkSettings      *settings,
                              GScanner         *scanner,
                              gchar            *name)
@@ -474,9 +515,9 @@ murrine_rc_style_parse (GtkRcStyle *rc_style,
 				token = theme_parse_boolean (settings, scanner, &murrine_style->animation);
 				murrine_style->flags |= MRN_FLAG_ANIMATION;
 				break;
-			case TOKEN_BORDER_SHADE:
-				token = theme_parse_shade (settings, scanner, &murrine_style->border_shade);
-				murrine_style->flags |= MRN_FLAG_BORDER_SHADE;
+			case TOKEN_BORDER_SHADES:
+				token = theme_parse_border (settings, scanner, murrine_style->border_shades);
+				murrine_style->flags |= MRN_FLAG_BORDER_SHADES;
 				break;
 			case TOKEN_COLORIZE_SCROLLBAR:
 				token = theme_parse_boolean (settings, scanner, &murrine_style->colorize_scrollbar);
@@ -652,8 +693,11 @@ murrine_rc_style_merge (GtkRcStyle *dest,
 
 	if (flags & MRN_FLAG_ANIMATION)
 		dest_w->animation = src_w->animation;
-	if (flags & MRN_FLAG_BORDER_SHADE)
-		dest_w->border_shade = src_w->border_shade;
+	if (flags & MRN_FLAG_BORDER_SHADES)
+	{
+		dest_w->border_shades[0] = src_w->border_shades[0];
+		dest_w->border_shades[1] = src_w->border_shades[1];
+	}
 	if (flags & MRN_FLAG_COLORIZE_SCROLLBAR)
 		dest_w->colorize_scrollbar = src_w->colorize_scrollbar;
 	if (flags & MRN_FLAG_CONTRAST)
diff --git a/src/murrine_rc_style.h b/src/murrine_rc_style.h
index 1ff1176..edde5fc 100644
--- a/src/murrine_rc_style.h
+++ b/src/murrine_rc_style.h
@@ -36,7 +36,7 @@ typedef struct _MurrineRcStyleClass MurrineRcStyleClass;
 typedef enum
 {
 	MRN_FLAG_ANIMATION = 1 << 0,
-	MRN_FLAG_BORDER_SHADE = 1 << 1,
+	MRN_FLAG_BORDER_SHADES = 1 << 1,
 	MRN_FLAG_COLORIZE_SCROLLBAR = 1 << 2,
 	MRN_FLAG_CONTRAST = 1 << 3,
 	MRN_FLAG_FOCUS_COLOR = 1 << 4,
@@ -72,7 +72,7 @@ struct _MurrineRcStyle
 
 	MurrineRcFlags flags;
 
-	double   border_shade;
+	double   border_shades[2];
 	double   contrast;
 	double   glow_shade;
 	double   gradient_shades[4];
diff --git a/src/murrine_style.c b/src/murrine_style.c
index 4b72647..8dbeed4 100644
--- a/src/murrine_style.c
+++ b/src/murrine_style.c
@@ -133,7 +133,6 @@ murrine_set_widget_parameters (const GtkWidget  *widget,
 	params->xthickness = style->xthickness;
 	params->ythickness = style->ythickness;
 
-	params->border_shade      = murrine_style->border_shade;
 	params->contrast          = murrine_style->contrast;
 	params->glazestyle        = murrine_style->glazestyle;
 	params->glow_shade        = murrine_style->glow_shade;
@@ -147,6 +146,9 @@ murrine_set_widget_parameters (const GtkWidget  *widget,
 	MurrineGradients mrn_gradient;
 	if (murrine_style->gradients)
 	{
+		mrn_gradient.border_shades[0] = murrine_style->border_shades[0];
+		mrn_gradient.border_shades[1] = murrine_style->border_shades[1];
+
 		mrn_gradient.gradient_shades[0] = murrine_style->gradient_shades[0];
 		mrn_gradient.gradient_shades[1] = murrine_style->gradient_shades[1];
 		mrn_gradient.gradient_shades[2] = murrine_style->gradient_shades[2];
@@ -154,6 +156,9 @@ murrine_set_widget_parameters (const GtkWidget  *widget,
 	}
 	else
 	{
+		mrn_gradient.border_shades[0] = 1.0;
+		mrn_gradient.border_shades[1] = 1.0;
+
 		mrn_gradient.gradient_shades[0] = 1.0;
 		mrn_gradient.gradient_shades[1] = 1.0;
 		mrn_gradient.gradient_shades[2] = 1.0;
@@ -2057,6 +2062,8 @@ murrine_style_init_from_rc (GtkStyle   *style,
 	GTK_STYLE_CLASS (murrine_style_parent_class)->init_from_rc (style, rc_style);
 
 	/* Shades/Colors/Ratio */
+	murrine_style->border_shades[0]   = MURRINE_RC_STYLE (rc_style)->border_shades[0];
+	murrine_style->border_shades[1]   = MURRINE_RC_STYLE (rc_style)->border_shades[1];
 	murrine_style->glow_shade         = MURRINE_RC_STYLE (rc_style)->glow_shade;
 	murrine_style->highlight_shade    = MURRINE_RC_STYLE (rc_style)->highlight_shade;
 	murrine_style->gradient_shades[0] = MURRINE_RC_STYLE (rc_style)->gradient_shades[0];
@@ -2087,7 +2094,6 @@ murrine_style_init_from_rc (GtkStyle   *style,
 	else
 		murrine_style->roundness = MURRINE_RC_STYLE (rc_style)->roundness;
 	murrine_style->animation           = MURRINE_RC_STYLE (rc_style)->animation;
-	murrine_style->border_shade        = MURRINE_RC_STYLE (rc_style)->border_shade;
 	murrine_style->contrast            = MURRINE_RC_STYLE (rc_style)->contrast;
 	murrine_style->colorize_scrollbar  = MURRINE_RC_STYLE (rc_style)->colorize_scrollbar;
 	murrine_style->has_focus_color     = MURRINE_RC_STYLE (rc_style)->has_focus_color;
@@ -2261,7 +2267,8 @@ murrine_style_copy (GtkStyle *style, GtkStyle *src)
 	MurrineStyle *mrn_src = MURRINE_STYLE (src);
 
 	mrn_style->animation           = mrn_src->animation;
-	mrn_style->border_shade        = mrn_src->border_shade;
+	mrn_style->border_shades[0]    = mrn_src->border_shades[0];
+	mrn_style->border_shades[1]    = mrn_src->border_shades[1];
 	mrn_style->colorize_scrollbar  = mrn_src->colorize_scrollbar;
 	mrn_style->colors              = mrn_src->colors;
 	mrn_style->contrast            = mrn_src->contrast;
diff --git a/src/murrine_style.h b/src/murrine_style.h
index 749e13f..3c81f8a 100644
--- a/src/murrine_style.h
+++ b/src/murrine_style.h
@@ -44,7 +44,7 @@ struct _MurrineStyle
 
 	MurrineProfiles profile;
 
-	double   border_shade;
+	double   border_shades[2];
 	double   contrast;
 	double   glow_shade;
 	double   gradient_shades[4];
diff --git a/src/murrine_types.h b/src/murrine_types.h
index d0a9631..a3df237 100644
--- a/src/murrine_types.h
+++ b/src/murrine_types.h
@@ -192,6 +192,7 @@ typedef struct
 
 typedef struct
 {
+	double  border_shades[2];
 	double  gradient_shades[4];
 	double  rgba_opacity;
 
@@ -219,7 +220,6 @@ typedef struct
 	int lightborderstyle;
 	int reliefstyle;
 	int roundness;
-	double border_shade;
 	double contrast;
 	double glow_shade;
 	double highlight_shade;



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