gtk-engines r1174 - in trunk: . engines/clearlooks/src



Author: bberg
Date: Tue May  6 19:16:20 2008
New Revision: 1174
URL: http://svn.gnome.org/viewvc/gtk-engines?rev=1174&view=rev

Log:
2008-05-06  Benjamin Berg  <benjamin sipsolutions net>

	* engines/clearlooks/src/clearlooks_style.c:
	(clearlooks_style_draw_box):
	Use the present steppers, not the slider position.

	* engines/clearlooks/src/support.c:
	(clearlooks_scrollbar_visible_steppers):
	If this is not a range, assume stepper A and D.


Modified:
   trunk/ChangeLog
   trunk/engines/clearlooks/src/clearlooks_style.c
   trunk/engines/clearlooks/src/support.c

Modified: trunk/engines/clearlooks/src/clearlooks_style.c
==============================================================================
--- trunk/engines/clearlooks/src/clearlooks_style.c	(original)
+++ trunk/engines/clearlooks/src/clearlooks_style.c	Tue May  6 19:16:20 2008
@@ -649,13 +649,15 @@
 		WidgetParameters params;
 		ScrollBarParameters scrollbar;
 		gboolean trough_under_steppers = TRUE;
+		ClearlooksStepper steppers;
 
 		clearlooks_set_widget_parameters (widget, style, state_type, &params);
 		params.corners = CR_CORNER_ALL;
 
 		scrollbar.horizontal = TRUE;
 		scrollbar.junction   = clearlooks_scrollbar_get_junction (widget);
-
+		
+		steppers = clearlooks_scrollbar_visible_steppers (widget);
 
 		if (CHECK_HINT (GE_HINT_HSCROLLBAR))
 			scrollbar.horizontal = TRUE;
@@ -678,24 +680,24 @@
 			 * but it needs to exist for backward compatibility. */
 			if (scrollbar.horizontal)
 			{
-				if (scrollbar.junction & CL_JUNCTION_BEGIN)
+				if (steppers & (CL_STEPPER_A | CL_STEPPER_B))
 				{
 					x += 2;
 					width -= 2;
 				}
-				if (scrollbar.junction & CL_JUNCTION_END)
+				if (steppers & (CL_STEPPER_C | CL_STEPPER_D))
 				{
 					width -= 2;
 				}
 			}
 			else
 			{
-				if (scrollbar.junction & CL_JUNCTION_END)
+				if (steppers & (CL_STEPPER_A | CL_STEPPER_B))
 				{
 					y += 2;
 					height -= 2;
 				}
-				if (scrollbar.junction & CL_JUNCTION_END)
+				if (steppers & (CL_STEPPER_C | CL_STEPPER_D))
 				{
 					height -= 2;
 				}

Modified: trunk/engines/clearlooks/src/support.c
==============================================================================
--- trunk/engines/clearlooks/src/support.c	(original)
+++ trunk/engines/clearlooks/src/support.c	Tue May  6 19:16:20 2008
@@ -171,8 +171,10 @@
 {
 	ClearlooksStepper steppers = 0;
 	
+	/* If this is not a range widget, assume that the primary steppers
+	 * are present. */
 	if (!GE_IS_RANGE (widget))
-		return 0;
+		return CL_STEPPER_A | CL_STEPPER_D;
 	
 	if (GTK_RANGE (widget)->has_stepper_a)
 		steppers |= CL_STEPPER_A;



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