diff -u -r gtk+2.0-2.18.0.orig/gtk/gtkrange.c gtk+2.0-2.18.0/gtk/gtkrange.c --- gtk+2.0-2.18.0.orig/gtk/gtkrange.c 2009-09-12 04:58:38.000000000 +0200 +++ gtk+2.0-2.18.0/gtk/gtkrange.c 2009-09-30 21:32:36.107624288 +0200 @@ -1815,9 +1815,13 @@ &range->layout->slider, &area)) { + gint trough_border; + area.x += widget->allocation.x; area.y += widget->allocation.y; + gtk_widget_style_get (widget, "trough-border", &trough_border, NULL); + gtk_paint_slider (widget->style, widget->window, state, @@ -1825,10 +1829,10 @@ &area, widget, gtk_range_get_slider_detail (range), - widget->allocation.x + range->layout->slider.x, - widget->allocation.y + range->layout->slider.y, - range->layout->slider.width, - range->layout->slider.height, + widget->allocation.x + range->layout->slider.x + ( range->orientation == GTK_ORIENTATION_HORIZONTAL ? 0 : trough_border ), + widget->allocation.y + range->layout->slider.y + ( range->orientation == GTK_ORIENTATION_HORIZONTAL ? trough_border : 0 ), + range->layout->slider.width - ( range->orientation == GTK_ORIENTATION_HORIZONTAL ? 0 : ( trough_border * 2 ) ), + range->layout->slider.height - ( range->orientation == GTK_ORIENTATION_HORIZONTAL ? ( trough_border * 2 ) : 0 ), range->orientation); } @@ -3187,8 +3191,8 @@ /* Slider fits into the trough, with stepper_spacing on either side, * and the size/position based on the adjustment or fixed, depending. */ - layout->slider.x = layout->trough.x + focus_width + trough_border; - layout->slider.width = layout->trough.width - (focus_width + trough_border) * 2; + layout->slider.x = layout->trough.x + focus_width; + layout->slider.width = layout->trough.width - (focus_width) * 2; /* Compute slider position/length */ { @@ -3336,8 +3340,8 @@ /* Slider fits into the trough, with stepper_spacing on either side, * and the size/position based on the adjustment or fixed, depending. */ - layout->slider.y = layout->trough.y + focus_width + trough_border; - layout->slider.height = layout->trough.height - (focus_width + trough_border) * 2; + layout->slider.y = layout->trough.y + focus_width; + layout->slider.height = layout->trough.height - (focus_width) * 2; /* Compute slider position/length */ {