I needed to change the mouse wheel scroll rate in GTK applications. I downloaded and modified GTK3 source code. I recompiled it. It did the trick for gedit and nautilus. But did not do it for gnome-terminal even though it is a GTK3 application.
I changed the lines starting with delta=
in the if-else clause. Just changed the numbers to weird ones so that I can see the change if there is any.
Here are the change I made to gtk/gtkrange.c
:
/**
* _gtk_range_get_wheel_delta:
* @range: a #GtkRange
* @direction: A #GdkScrollDirection
*
* Returns a good step value for the mouse wheel.
*
* Return value: A good step value for the mouse wheel.
*
* Since: 2.4
**/
gdouble
_gtk_range_get_wheel_delta (GtkRange *range,
GdkScrollDirection direction)
{
GtkRangePrivate *priv = range->priv;
GtkAdjustment *adjustment = priv->adjustment;
gdouble delta;
if (GTK_IS_SCROLLBAR (range))
**delta = pow (gtk_adjustment_get_page_size (adjustment), 1.0 / 94.0);**
else
**delta = gtk_adjustment_get_step_increment (adjustment) * 400;**
if (direction == GDK_SCROLL_UP ||
direction == GDK_SCROLL_LEFT)
delta = - delta;
if (priv->inverted)
delta = - delta;
return delta;
}