In GimpSpinButton, adjust the scroll step in response to modifiers:
normal scrolling uses the step increment, Ctrl uses the page
increment, and Shift scales the step increment down by the ratio
between the page and step increments (up to the minimal precision
of the spin button).
This applies to all spin buttons used in GIMP, including spin
scales.
(cherry picked from commit ac8bf47fa6)
In gimp_gegl_apply_cached_operation(), use gint64 for storing the
total and processed pixel counts used for reporting progress, to
avoid overflowing when applying an operation to a large image.
(cherry picked from commit f1c448e0f4)
GimpSpinScale now always grabs focus in response to a button press
in compact mode. However, like before, the left button is always
used for absolute adjustment, even when pressed over the text,
instead of controlling the text cursor.
The right button is now used both for relative adjustment, and to
select the entire text. Alternatively, the same can be achieved
with Shift+left-button.
The middle button has no special function.
Regardless, if a button-press event over the text triggers a
context menu, this overrides any of the above.
In plug_in_compat.pdb, when wrapping an op node inside a graph, set
the op node as the graph node's underlying operation. This allows
gimp_gegl_apply_operation() to perform certain optimizations.
(cherry picked from commit e74994feaf)
In plug_in_compat.pdb, don't add child nodes to nodes containing an
op, since this turns them into graphs and discards the op.
Instead, add a new wrap_in_graph() helper function, which takes a
node op and wraps it in a simple "input -> op -> output" graph.
Use the graph as the container for child nodes, and as the node
passed to gimp_drawable_apply_operation(). (This is similar to
what we used to do before commit
afdd573136, except that we now pass
the parent node to gimp_drawable_apply_operation(), instead of the
op node).
(cherry picked from commit 8b7bafa43a)
Add a boolean "compact" style property for GimpSpinScale. When
TRUE, the widget uses a narrower layout, and the different upper/
lower-half behavior is gone. Instead, the behavior depends on the
mouse button used: left-click is used for absolute adjustment
(similar to the upper-half behavior), middle-click is used for
relative adjustment (similar to the lower-half behavior), and right
click is used for manual value entry (similar for clicking on the
text area).
Add a new "Compact sliders" toggle to the Interface prefernces, to
control the spin-scale style. Apply the style globally through the
themerc file, and update it when the option changes.
Use the compact style by default, because otherwise no one would
find it. Theming in GTK3 works differently, and spin scales in
master need more work regardless, so this stays in 2.10 for now.
Add a new 3D Transform tool, based on GimpToolTransform3DGrid,
added in the previous commit. The tool UI provides a notbook with
three tabs, corresponding to the three GimpToolTransform3DGrid
modes:
Camera - allows setting the primary vanishing point, as well as
the camera's focal length, expressed either directly, or as the
camera's angle of view, relative to the whole image or the
transformed item. By default, the vanishing point is aligned
with the item's center, and the angle of view is fixed relative
to the item; this essentially means that each item is transformed
using a local perspective, independent of its position and size
relative to the image. A global perspective can be achieved by
using a common vanishing point and focal length (or an image-
relative angle of view).
Move - allows moving the item using X, Y, and Z offsets.
Rotate - allows rotating the item using X, Y, and Z Euler angles.
The order of rotation of the different axes can be controlled by
a set of numbered buttons next to the sliders, and the rotation's
pivot can be controlled using a pivot selector.
Add a new GimpToolTransform3DGrid tool widget, subclassed from
GimpToolTransformGrid, which can be used to perform 3D
transformations.
The widget can be in one of three modes:
CAMERA - allows adjusting the primary vanishing point by moving a
handle.
MOVE - allows moving the object through dragging.
ROTATE - allows rotating the object through dragging.
By default, controlling the transformation through dragging applies
to the X and Y axes. Holding Shift (or setting the "constrain-
axis" property) restricts the motion to only one of the axes.
For the MOVE and ROTATE mode, holding Ctrl (or setting the "z-axis"
property) allows controlling the Z axis instead.
For the same modes, holding Alt (or setting the "local-frame"
property), applies the adjustments in the object's local frame of
reference, instead of the display's global frame of reference.
Add a boolean GimpTransformGridTool::dynamic-handle-size property,
which controls whether the handle sizes are adjustment dynamically
according to the grid's size, or remain fixed. This property is
TRUE by default, to maintain the current behavior.
In GimpToolTransformGrid, allow setting "inside-function" and
"outside-function" to a new NONE value, performing no
transformation when dragging the respective area.
GimpPivotSelector is a 3x3 grid of toggle buttons, used for
selecting a natural pivot position (e.g., for a transform) relative
to an item: its center, its corners, and the midpoints of its
edges.
The tool dialog of generic-transform tools (the Unified,
Perspective, and Handle Trasnform tools) shows the current
transformation matrix. Although we might as well show *something*
in the dialog (we can't get rid of it altogether, as it provides
the common tool actions), this information is probably meaningless
for most users, and isn't directly editable anyway.
Reduce the size of the matrix, to make it less prominent, and free
up some space.
Add a boolean 'compress' parameter to
gimp_transform_grid_tool_push_internal_undo(). When TRUE,
successive undo steps added rapidly are compressed into a single
step.
In the various subclasses, compress undo steps for dialog changes,
since we push an undo step for every intermediate change for those
(such as while dragging a spin-scale). In contrast, we only push
tool-widget undo steps upon button release, hence there's no need
to compress them.
In gimp_transform_grid_tool_push_internal_undo(), only flush the
image when undo/redo availability for the tool changes, instead of
for every undo step. This speeds things up when many undo steps
are pushed in succession, which usually happens when using the tool
GUI.
In GimpSizeEntry, the value corresponding to 0%, as per
gimp_size_entry_set_size(), may be non-zero. This works correctly
when using the size entry in percentage mode, but not when using
precentage as part of arithmetic.
Fix this by adding an 'offset' parameter to eevl's unit-resolution
callback, which can be specifies a constant value to add as part
of unit conversion, after scaling the converted value by the
conversion factor. In GimpSizeEntry, use this parameter to offset
percentages by their lower bound.
Add GRAY* to the list of supported image types.
(cherry picked from commit 38cccaac49)
(not really a cherry-pick, but nice to see the resp. commit from
master)
...format version 10.
Simply allow the parser to read version 10, seems to work
with the brushes in issue #2862.
(cherry picked from commit c39d8fde33)
Which is a linear transform of xyY that is more perceptually
uniform, and so well-suited for eventually adding chromaticity
diagrams to GIMP color tools. ACES documentation uses this color
space instead of xyY for showing chromaticity diagrams. Moving
forward I expect other venues also will start using Yu'v' as
the advantages over xyY chromaticity diagrams are fairly obvious.
(cherry picked from commit bb660c5821)
Adds a number of modifier keys to the layer dockable's new "Merge Down"
button to access further functions, and adds among them a new action to
merge visible layers using the dialog's last values, akin to those
accompanying the New Layer and Add Layer Mask dialogs.
Modifier keys are bound as follows:
Shift -> Merge layer group
Ctrl -> Merge visible layers
Ctrl + Shift -> Merge visible layers from last used values
The Merge Down button is kept sensitive even when the current layer
can't be merged down to allow access to these functions
(cherry picked from commit a11ada4ce2)
As they are both mutually exclusive and serve an almost identical
purpose, the "Merge down" and "Anchor Layer" are given mutually
exclusive visibility in menus, and the anchor button is replaced
with a merge down button in the Layers dockable whenever there is
no active floating selection
(cherry picked from commit f539fc78c0)
...MyPaint brushes dialog
In gimp_tag_entry_assign_tags(), don't add/remove tags while iterating
tag_entry->selected_items, because that might change the list. Instead,
make a temporary deep copy of the list and iterate the copy. Spotted
by Massimo.
(cherry picked from commit ff32fe9f5d)
Must call gimp_action_init() from gimp_action_impl_init() or the
signal handlers to update label and tooltip will ever be installed.
Found by Massimo.
(cherry picked from commit 45ad58dff4)
... property name validation.
Previous commit fixed the parameter name validation in core code. This
commit fixes the source error in the plug-in code.
... property name validation.
GLib tightened its GParamSpec name validation, as it used to only check
that the first letter was a letter, which triggered this issue, though
the crash could have also happened with the former lax rules too (commit
30e630c9df792cf36cdb1cceb3daefbde1dc898a).
I opened a merge request in GLib to make the validation code into a
public function. In the meantime, let's just copy-paste the validation
code into ours and when a plug-in attempts to create a procedure with
invalid parameter or return value names, GIMP will just output an error
and refuse to install the procedure instead of crashing.
See: https://gitlab.gnome.org/GNOME/glib/merge_requests/1302