Fixes to account for the changed structure of the windows of range

Tue Feb  2 11:06:02 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrange.c (gtk_range_style_set): Fixes
	 to account for the changed structure of the windows
	 of range widgets.
This commit is contained in:
Owen Taylor 1999-02-04 16:12:35 +00:00 committed by Owen Taylor
parent 189ee72781
commit 674b23e434

View File

@ -1553,29 +1553,18 @@ gtk_range_style_set (GtkWidget *widget,
range = GTK_RANGE (widget); range = GTK_RANGE (widget);
if (GTK_WIDGET_REALIZED (widget) && if (GTK_WIDGET_REALIZED (widget))
!GTK_WIDGET_NO_WINDOW (widget))
{ {
if (range->trough) if (range->trough)
{ gtk_style_set_background (widget->style, range->trough, GTK_STATE_ACTIVE);
gtk_style_set_background (widget->style, range->trough, GTK_STATE_ACTIVE);
if (GTK_WIDGET_DRAWABLE (widget)) if (range->slider)
gdk_window_clear (range->trough); gtk_style_set_background (widget->style, range->slider, GTK_STATE_NORMAL);
}
/* The draw will take care of the slider */
if (range->step_forw) if (range->step_forw)
{ gtk_style_set_background (widget->style, range->step_forw, GTK_STATE_ACTIVE);
gtk_style_set_background (widget->style, range->step_forw, GTK_STATE_ACTIVE);
if (GTK_WIDGET_DRAWABLE (widget))
gdk_window_clear (range->step_forw);
}
if (range->step_back) if (range->step_back)
{ gtk_style_set_background (widget->style, range->step_back, GTK_STATE_ACTIVE);
gtk_style_set_background (widget->style, range->step_back, GTK_STATE_ACTIVE);
if (GTK_WIDGET_DRAWABLE (widget))
gdk_window_clear (range->step_back);
}
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
} }
} }