murrine r7 - in trunk: . src



Author: acimitan
Date: Fri Feb 15 08:18:11 2008
New Revision: 7
URL: http://svn.gnome.org/viewvc/murrine?rev=7&view=rev

Log:
2008-02-15  Andrea Cimitan  <andrea cimitan gmail com>

	* src/animation.h:
	* src/murrine_draw_rgba.c: (murrine_rgba_draw_tab):
	* src/murrine_style.c: (murrine_style_draw_box_gap):
	* src/support.h:
	Using cairo operator SOURCE to draw notebooks in RGBA
	Removed a duplicated definition of MRN_IS_PROGRESS_BAR


Modified:
   trunk/ChangeLog
   trunk/src/animation.h
   trunk/src/cairo-support.c
   trunk/src/murrine_draw_rgba.c
   trunk/src/murrine_style.c
   trunk/src/support.h

Modified: trunk/src/animation.h
==============================================================================
--- trunk/src/animation.h	(original)
+++ trunk/src/animation.h	Fri Feb 15 08:18:11 2008
@@ -23,7 +23,7 @@
 #ifdef HAVE_ANIMATION
 #include <gtk/gtk.h>
 
-#define MRN_IS_PROGRESS_BAR(widget) GTK_IS_PROGRESS_BAR(widget) && widget->allocation.x != -1 && widget->allocation.y != -1
+/* #define MRN_IS_PROGRESS_BAR(widget) GTK_IS_PROGRESS_BAR(widget) && widget->allocation.x != -1 && widget->allocation.y != -1 */
 #define ANIMATION_DELAY 100
 #define CHECK_ANIMATION_TIME 0.5
 

Modified: trunk/src/cairo-support.c
==============================================================================
--- trunk/src/cairo-support.c	(original)
+++ trunk/src/cairo-support.c	Fri Feb 15 08:18:11 2008
@@ -506,10 +506,10 @@
 	             clearlooks_rounded_rectangle (cr, x, y, width, height, radius-1, corners);
 
 	pattern = cairo_pattern_create_linear (x, y, !horizontal ? width+x : x, !horizontal ? y : height+y);
-	cairo_pattern_add_color_stop_rgba (pattern,  0.0,      shade1.r, shade1.g, shade1.b, 0.5*alpha_value);
-	cairo_pattern_add_color_stop_rgba (pattern,  0.5,      shade2.r, shade2.g, shade2.b, 0.5*alpha_value);
-	cairo_pattern_add_color_stop_rgba (pattern,  0.5,      shade3.r, shade3.g, shade3.b, 0.5*alpha_value);
-	cairo_pattern_add_color_stop_rgba (pattern,  fill_pos, shade4.r, shade4.g, shade4.b, 0.5*alpha_value);
+	cairo_pattern_add_color_stop_rgba (pattern, 0.0,      shade1.r, shade1.g, shade1.b, 0.5*alpha_value);
+	cairo_pattern_add_color_stop_rgba (pattern, 0.5,      shade2.r, shade2.g, shade2.b, 0.5*alpha_value);
+	cairo_pattern_add_color_stop_rgba (pattern, 0.5,      shade3.r, shade3.g, shade3.b, 0.5*alpha_value);
+	cairo_pattern_add_color_stop_rgba (pattern, fill_pos, shade4.r, shade4.g, shade4.b, 0.5*alpha_value);
 	cairo_pattern_add_color_stop_rgba (pattern, fill_pos, fill_shade.r, fill_shade.g, fill_shade.b, 0.0);
 	cairo_pattern_add_color_stop_rgba (pattern, 1.0,      fill_shade.r, fill_shade.g, fill_shade.b, 0.0);
 	cairo_set_source (cr, pattern);

Modified: trunk/src/murrine_draw_rgba.c
==============================================================================
--- trunk/src/murrine_draw_rgba.c	(original)
+++ trunk/src/murrine_draw_rgba.c	Fri Feb 15 08:18:11 2008
@@ -1061,6 +1061,8 @@
 	cairo_set_line_width (cr, 1.0);
 	cairo_translate      (cr, x+0.5, y+0.5);
 
+	cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
+
 	/* Make the tabs slightly bigger than they should be, to create a gap */
 	/* And calculate the strip size too, while you're at it */
 	if (tab->gap_side == MRN_GAP_TOP || tab->gap_side == MRN_GAP_BOTTOM)
@@ -1189,6 +1191,7 @@
 		cairo_pattern_destroy (pattern);
 
 		cairo_set_line_width (cr, 1.0);
+		cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
 		murrine_set_color_rgba (cr, &colors->shade[0], 0.2);
 
 		if (widget->roundness < 2)
@@ -1224,10 +1227,11 @@
 
 		cairo_pattern_add_color_stop_rgba (pattern, 0.0,        stripe_fill->r, stripe_fill->g, stripe_fill->b, NOTEBOOK_OPACITY);
 		cairo_pattern_add_color_stop_rgba (pattern, strip_size, stripe_fill->r, stripe_fill->g, stripe_fill->b, NOTEBOOK_OPACITY);
-		cairo_pattern_add_color_stop_rgba (pattern, strip_size, fill->r, fill->g, fill->b, 0.0);
+		cairo_pattern_add_color_stop_rgba (pattern, strip_size, fill->r, fill->g, fill->b, NOTEBOOK_OPACITY);
 		cairo_set_source (cr, pattern);
 		cairo_fill (cr);
 		cairo_pattern_destroy (pattern);
+		cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
 	}
 
 	murrine_rounded_rectangle (cr, 0, 0, width-1, height-1, widget->roundness, corners);

Modified: trunk/src/murrine_style.c
==============================================================================
--- trunk/src/murrine_style.c	(original)
+++ trunk/src/murrine_style.c	Fri Feb 15 08:18:11 2008
@@ -502,6 +502,9 @@
 		if (params.roundness < 2)
 			params.corners = MRN_CORNER_NONE;
 
+		if (params.mrn_gradient.use_rgba)
+			cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
+
 		/* Fill the background with bg[NORMAL] */
 		murrine_rounded_rectangle (cr, x, y, width, height, params.roundness, params.corners);
 		if (!params.mrn_gradient.use_rgba)
@@ -510,6 +513,9 @@
 			murrine_set_color_rgba (cr, &colors->bg[0], NOTEBOOK_OPACITY);
 		cairo_fill(cr);
 
+		if (params.mrn_gradient.use_rgba)
+			cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
+
 		STYLE_FUNCTION(draw_frame) (cr, colors, &params, &frame,
 		                            x, y, width, height);
 	}

Modified: trunk/src/support.h
==============================================================================
--- trunk/src/support.h	(original)
+++ trunk/src/support.h	Fri Feb 15 08:18:11 2008
@@ -28,14 +28,6 @@
 #include "murrine_types.h"
 #include "cairo-support.h"
 
-/* GTK 2.2 compatibility */
-#ifndef GTK_IS_COMBO_BOX_ENTRY
-	#define GTK_IS_COMBO_BOX_ENTRY(x) 0
-#endif
-#ifndef GTK_IS_COMBO_BOX
-	#define GTK_IS_COMBO_BOX(x) 0
-#endif
-
 #define RADIO_SIZE 13
 #define CHECK_SIZE 13
 
@@ -43,7 +35,7 @@
 #define GRADIENT_OPACITY 0.90
 #define WINDOW_OPACITY 0.84
 #define ENTRY_OPACITY 0.88
-#define NOTEBOOK_OPACITY 0.74
+#define NOTEBOOK_OPACITY 0.90
 #define MENUBAR_OPACITY 0.90
 #define MENUBAR_GLOSSY_OPACITY 0.86
 #define MENUBAR_STRIPED_OPACITY 0.94



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