Commit 694fde48 authored by Michael Natterer's avatar Michael Natterer 😴

app: fix area-based scale_limits in gimp_prop_widget_new_from_pspec()

Don't set scale limits outside the hard limits of the GParamSpec,
and remove debug g_printerr().
parent d13fa390
......@@ -279,21 +279,19 @@ gimp_prop_widget_new_from_pspec (GObject *config,
if (HAS_KEY (pspec, "axis", "x"))
{
g_printerr ("XXX setting width %d on %s\n",
area->width, pspec->name);
gint min = MAX (lower, off_x);
gint max = MIN (upper, off_x + area->width);
gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (widget),
off_x,
off_x + area->width);
min, max);
}
else if (HAS_KEY (pspec, "axis","y"))
{
g_printerr ("XXX setting height %d on %s\n",
area->height, pspec->name);
gint min = MAX (lower, off_y);
gint max = MIN (upper, off_y + area->height);
gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (widget),
off_y,
off_y + area->height);
min, max);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment