Remove GtkRange::activate-slider

This was a style property to let theme engines 'opt-in' to more
correct behaviour while maintaining compatibility with existing
themes. GTK+ 3 engines are expected to handle the more correct
behaviour.
This commit is contained in:
Matthias Clasen 2010-09-01 22:09:44 -04:00
parent d28af9cbb9
commit 1956cf8d28

View File

@ -559,13 +559,6 @@ gtk_range_class_init (GtkRangeClass *class)
0, 0,
GTK_PARAM_READABLE)); GTK_PARAM_READABLE));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_boolean ("activate-slider",
P_("Draw slider ACTIVE during drag"),
P_("With this option set to TRUE, sliders will be drawn ACTIVE and with shadow IN while they are dragged"),
FALSE,
GTK_PARAM_READABLE));
/** /**
* GtkRange:trough-under-steppers: * GtkRange:trough-under-steppers:
* *
@ -2116,15 +2109,8 @@ gtk_range_expose (GtkWidget *widget,
if (priv->grab_location == MOUSE_SLIDER) if (priv->grab_location == MOUSE_SLIDER)
{ {
gboolean activate_slider; state = GTK_STATE_ACTIVE;
shadow_type = GTK_SHADOW_IN;
gtk_widget_style_get (widget, "activate-slider", &activate_slider, NULL);
if (activate_slider)
{
state = GTK_STATE_ACTIVE;
shadow_type = GTK_SHADOW_IN;
}
} }
if (gdk_rectangle_intersect (&expose_area, if (gdk_rectangle_intersect (&expose_area,
@ -2444,7 +2430,6 @@ gtk_range_button_press (GtkWidget *widget,
priv->mouse_location == MOUSE_SLIDER) priv->mouse_location == MOUSE_SLIDER)
{ {
gboolean need_value_update = FALSE; gboolean need_value_update = FALSE;
gboolean activate_slider;
/* Any button can be used to drag the slider, but you can start /* Any button can be used to drag the slider, but you can start
* dragging the slider with a trough click using button 2; * dragging the slider with a trough click using button 2;
@ -2493,13 +2478,7 @@ gtk_range_button_press (GtkWidget *widget,
range_grab_add (range, device, MOUSE_SLIDER, event->button); range_grab_add (range, device, MOUSE_SLIDER, event->button);
gtk_widget_style_get (widget, "activate-slider", &activate_slider, NULL); gtk_widget_queue_draw (widget);
/* force a redraw, if the active slider is drawn differently to the
* prelight one
*/
if (activate_slider)
gtk_widget_queue_draw (widget);
if (need_value_update) if (need_value_update)
update_slider_position (range, event->x, event->y); update_slider_position (range, event->x, event->y);