+ if (priv->zoom)
+ {
+ zoom = MIN(1.0, (priv->orientation == GTK_ORIENTATION_VERTICAL ?
+ priv->trough.height : priv->trough.width) /
+ (gtk_adjustment_get_upper (priv->adjustment) -
+ gtk_adjustment_get_lower (priv->adjustment) -
+ gtk_adjustment_get_page_size (priv->adjustment)));
+ /* the above is ineffective for scales, so just set a zoom factor */
+ if (zoom == 1.0)
+ zoom = 0.25;
+ }
+ else
+ zoom = 1.0;
+
+ c = priv->slide_initial_slider_position + zoom * delta;