Commit Graph

10 Commits

Author SHA1 Message Date
Ell
2dad85b84f libgimpwidgets, app, plug-ins: use GimpSpinButton everywhere
Replace all direct uses of GtkSpinButton with GimpSpinButton, so
that its modified behavior extends to all our spin buttons.
2019-03-09 07:43:13 -05:00
ffe2fb478c app: new gimp_spin_scale_set_constrain_drag() and use it on paint...
... tools' brush options.
After discussions, it turned out that many people disliked that the spin
scale for brush size (and some other options) get you fractional values.
How often do you actually need to get a 4.32 pixel-size brush? And even
how meaningful is it? On the other hand, you usually want a 4 or a 5
pixel size brush and it's nearly impossible to get (exactly) by dragging
the scale widget.
It is so annoying that some even resort to edit the value with keyboard!
So I am adding an optional "constrain" feature to GimpSpinScale. It will
still be possible to get fractional values when constraining is on, for
instance with keyboard edit (the arrow incrementation also will keep any
fractional part). So the interaction for such scales is simply reversed
so that you get integers easily, and fractional parts with a bit more
effort.

It is not turned on by default (some feature actually need precision and
we don't want to break the sliders for these) and for the time being, I
only applied it to all the brush settings in paint tools. Now that it
exist, we may want to apply this to more scales in various parts of
GIMP.

(cherry picked from commit bff3903f37)
2019-01-25 18:34:09 +01:00
a88c0ffb93 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:47:19 +02:00
0a73a787ba app: remove GimpSpinScale's "factor" API again
The method of replacing the spinbutton's adjustment was just waiting
for some future bugs to appear.
2013-06-15 20:53:37 +02:00
766c4a026c app: add an optional "factor" to GimpSpinScale
which allows to display a value different from the original
adjustment's value.

This is sortof a hack but insanely useful to map normalized config
values to a nicer range (e.g. 0.0 -> 1.0 to 0 ->100).
2013-05-28 23:45:45 +02:00
6940c00774 app: add gimp_spin_scale_set_label() and get_label() 2013-05-28 15:29:44 +02:00
f80b6a067a app: anal 2012-05-02 17:50:47 +02:00
553b7c7c03 app: add configurable nonlinear mapping (gamma) to spinscale widget
The default value is 1.0 which is linear and the old behavior, values above
1.0 gives finer control in the lower portions of the range, the lower half of
the widget behaves like before doing small relative adjustments.
2012-05-02 17:50:44 +02:00
d300ec6556 app: add a "scale_limit" API to GimpSpinScale
which allows to restrict the scale to a range that is smaller than
that of the model GtkAdjustment. This way we can enter large values in
the entry or by dragging beyond the end of the scale, but keep a
reasonably usable scale range for "normal" values.
2011-04-18 21:01:48 +02:00
ae3afca697 app: add new widget GimpSpinScale which is a combined spinbutton and scale 2010-11-01 20:03:39 +01:00