[murrine] Expander now follows arrowstyle = 2



commit 281212b097d7d3fb4ff16a54f027dc99cf8bd1ab
Author: Andrea Cimitan <andrea cimitan Å?mail com>
Date:   Wed Jul 28 23:12:51 2010 +0200

    Expander now follows arrowstyle = 2

 src/murrine_draw.c  |    3 ++-
 src/murrine_style.c |    1 +
 src/murrine_types.h |    1 +
 3 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/murrine_draw.c b/src/murrine_draw.c
index f681532..4c76185 100644
--- a/src/murrine_draw.c
+++ b/src/murrine_draw.c
@@ -2805,6 +2805,7 @@ murrine_draw_expander_arrow (cairo_t *cr,
 	cairo_pattern_t *pat;
 
 	int diameter;
+	int offset = (expander->arrowstyle == 2) ? 1 : 0;
 	double vertical_overshoot;
 	double radius;
 	double interp; /* interpolation factor for center position */
@@ -2879,7 +2880,7 @@ murrine_draw_expander_arrow (cairo_t *cr,
 	cairo_rotate (cr, degrees * G_PI / 180);
 
 	cairo_move_to (cr, -radius / 2.0, -radius / 2.0);
-	cairo_line_to (cr,  radius / 2.0,  0);
+	cairo_line_to (cr,  radius / 2.0 - offset,  0);
 	cairo_line_to (cr, -radius / 2.0,  radius / 2.0);
 	cairo_close_path (cr);
 	
diff --git a/src/murrine_style.c b/src/murrine_style.c
index 9c9162d..578c1b3 100644
--- a/src/murrine_style.c
+++ b/src/murrine_style.c
@@ -2163,6 +2163,7 @@ murrine_style_draw_expander (GtkStyle        *style,
 
 	expander.expander_style = expander_style;
 	expander.text_direction = murrine_get_direction (widget);
+	expander.arrowstyle = murrine_style->arrowstyle;
 	expander.style = murrine_style->expanderstyle;
 
 	STYLE_FUNCTION(draw_expander) (cr, colors, &params, &expander, x, y);
diff --git a/src/murrine_types.h b/src/murrine_types.h
index fcacd01..7661358 100644
--- a/src/murrine_types.h
+++ b/src/murrine_types.h
@@ -246,6 +246,7 @@ typedef struct
 typedef struct
 {
 	boolean in_treeview;	
+	int arrowstyle;
 	int size;
 	int style;
 	GtkExpanderStyle expander_style;



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