murrine r100 - in trunk: . src



Author: acimitan
Date: Sat Dec 27 19:46:28 2008
New Revision: 100
URL: http://svn.gnome.org/viewvc/murrine?rev=100&view=rev

Log:
2008-12-27  Andrea Cimitan  <andrea cimitan gmail com>

	* src/murrine_draw.c (murrine_draw_scrollbar_slider):
	* src/murrine_style.c (murrine_style_draw_box):
	Draw rounded scrollbars sliders when GtkRange::trough-border > 0.


Modified:
   trunk/ChangeLog
   trunk/src/murrine_draw.c
   trunk/src/murrine_style.c

Modified: trunk/src/murrine_draw.c
==============================================================================
--- trunk/src/murrine_draw.c	(original)
+++ trunk/src/murrine_draw.c	Sat Dec 27 19:46:28 2008
@@ -1370,11 +1370,7 @@
 		width = tmp;
 	}
 
-	murrine_set_color_rgb (cr, &border);
-	murrine_rounded_rectangle_fast (cr, 0.5, 0.5, width-1, height-1, widget->corners);
-	cairo_stroke (cr);
-
-	cairo_rectangle (cr, 1, 1, width-2, height-2);
+	murrine_rounded_rectangle_closed (cr, 1, 1, width-2, height-2, widget->roundness, widget->corners);
 
 	murrine_draw_glaze (cr, &fill, widget->highlight_ratio, widget->lightborder_ratio,
 	                    widget->mrn_gradient, widget, 1, 1, width-2, height-2,
@@ -1448,19 +1444,22 @@
 	/* Draw the handle */
 	if (scrollbar->style > 0 && scrollbar->style % 2 == 0)
 	{
-		int bar_x = width/2-4;
-		cairo_translate (cr, 0.5, 0.5);
+		double bar_x = width/2-4.5;
 		int i;
 		for (i=0; i<3; i++)
 		{
-			cairo_move_to (cr, bar_x, 4.5);
-			cairo_line_to (cr, bar_x, height-5.5);
+			cairo_move_to (cr, bar_x, 5);
+			cairo_line_to (cr, bar_x, height-5);
 			murrine_set_color_rgb (cr, &border);
 			cairo_stroke (cr);
 
 			bar_x += 3;
 		}
 	}
+
+	murrine_set_color_rgb (cr, &border);
+	murrine_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, widget->roundness, widget->corners);
+	cairo_stroke (cr);
 }
 
 static void

Modified: trunk/src/murrine_style.c
==============================================================================
--- trunk/src/murrine_style.c	(original)
+++ trunk/src/murrine_style.c	Sat Dec 27 19:46:28 2008
@@ -1148,12 +1148,14 @@
 		}
 
 		murrine_set_widget_parameters (widget, style, state_type, &params);
-
 		params.corners = MRN_CORNER_NONE;
 
 		if (DETAIL ("slider"))
 		{
-			if (murrine_style->roundness == 1)
+			int trough_border = 0;
+			gtk_widget_style_get (widget, "trough-border", &trough_border, NULL);
+
+			if (trough_border > 0 || murrine_style->roundness == 1)
 				params.corners = MRN_CORNER_ALL;
 			else
 				params.corners = MRN_CORNER_NONE;



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