Commit e701700a authored by Ell's avatar Ell

app: only use area dim., not off., for ui range of pixel-distance op props

Don't offset the ui range of op properties that use pixel-distance
units to the top-left corner of the region, since they're relative;
only do that for pixel-coordinate units.  Let their ui range be
[0, width/height].
parent 54fd8101
......@@ -264,14 +264,23 @@ gimp_prop_widget_new_from_pspec (GObject *config,
if (HAS_KEY (pspec, "unit", "pixel-coordinate") ||
HAS_KEY (pspec, "unit", "pixel-distance"))
gint off_x = 0;
gint off_y = 0;
if (HAS_KEY (pspec, "unit", "pixel-coordinate"))
off_x = area->x;
off_y = area->y;
if (HAS_KEY (pspec, "axis", "x"))
g_printerr ("XXX setting width %d on %s\n",
area->width, pspec->name);
gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (widget),
area->x + area->width);
off_x + area->width);
else if (HAS_KEY (pspec, "axis","y"))
......@@ -279,8 +288,8 @@ gimp_prop_widget_new_from_pspec (GObject *config,
area->height, pspec->name);
gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (widget),
area->y + area->height);
off_y + area->height);
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