murrine r49 - in trunk: . src



Author: acimitan
Date: Thu Aug 28 13:49:21 2008
New Revision: 49
URL: http://svn.gnome.org/viewvc/murrine?rev=49&view=rev

Log:
2008-08-28  Andrea Cimitan  <andrea cimitan gmail com>

	* src/murrine_style.c (murrine_set_widget_parameters),
	(murrine_style_draw_shadow), (murrine_style_draw_box):
	Moved some GtkEntry and GtkSpinButton workarounds


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

Modified: trunk/src/murrine_style.c
==============================================================================
--- trunk/src/murrine_style.c	(original)
+++ trunk/src/murrine_style.c	Thu Aug 28 13:49:21 2008
@@ -114,9 +114,6 @@
                                GtkStateType     state_type,
                                WidgetParameters *params)
 {
-	if (widget && MRN_IS_ENTRY (widget))
-		state_type = GTK_WIDGET_STATE (widget);
-
 	MurrineStyle *murrine_style = MURRINE_STYLE (style);
 
 	params->active     = (state_type == GTK_STATE_ACTIVE);
@@ -365,6 +362,11 @@
 	{
 		WidgetParameters params;
 
+		/* Override the entries state type, because we are too lame to handle this via
+		 * the focus ring, and GtkEntry doesn't even set the INSENSITIVE state ... */
+		if (state_type == GTK_STATE_NORMAL && widget && MRN_IS_ENTRY (widget))
+			state_type = GTK_WIDGET_STATE (widget);
+
 		murrine_set_widget_parameters (widget, style, state_type, &params);
 
 		if (widget && (MRN_IS_COMBO (widget->parent) ||
@@ -832,6 +834,11 @@
 	{
 		WidgetParameters params;
 
+		/* The "spinbutton" box is always drawn with state NORMAL, even if it is insensitive.
+		 * So work around this here. */
+		if (state_type == GTK_STATE_NORMAL && widget && MRN_IS_ENTRY (widget))
+			state_type = GTK_WIDGET_STATE (widget);
+
 		murrine_set_widget_parameters (widget, style, state_type, &params);
 		params.roundness = murrine_style->roundness;
 



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