$NetBSD: patch-aa,v 1.7 2006/04/04 13:41:47 jmmv Exp $

--- engines/clearlooks/src/clearlooks_style.c.orig	2006-03-11 13:14:40.000000000 +0100
+++ engines/clearlooks/src/clearlooks_style.c
@@ -974,23 +974,23 @@ draw_box (DRAW_ARGS)
 	else if (DETAIL ("trough") &&
 		     (GTK_IS_VSCALE (widget) || GTK_IS_HSCALE (widget)))
 	{
-		gint slider_length;
+		gint fill_size, slider_length;
 		GdkGC   *inner  = clearlooks_style->shade_gc[3],
 		        *outer  = clearlooks_style->shade_gc[5],
 			    *shadow = clearlooks_style->shade_gc[4];
 		GdkColor upper_color = *clearlooks_get_spot_color (CLEARLOOKS_RC_STYLE (style->rc_style)),
 				 lower_color;
 		
-		gtk_widget_style_get (widget, "slider-length", &slider_length, NULL);
-		
 		GtkAdjustment *adjustment = gtk_range_get_adjustment (GTK_RANGE (widget));
 		
 		GtkOrientation orientation = GTK_RANGE (widget)->orientation;
 		
-		gint fill_size = ((orientation ? height : width) - slider_length) * 
-		                 (1 / ((adjustment->upper - adjustment->lower) / 
-		                      (adjustment->value - adjustment->lower)))
-		                 + slider_length / 2;
+		gtk_widget_style_get (widget, "slider-length", &slider_length, NULL);
+		
+		fill_size = ((orientation ? height : width) - slider_length) * 
+		            (1 / ((adjustment->upper - adjustment->lower) / 
+		                 (adjustment->value - adjustment->lower)))
+		            + slider_length / 2;
 
 		if (orientation == GTK_ORIENTATION_HORIZONTAL)
 		{
