Commit Graph

42476 Commits

Author SHA1 Message Date
34e41e9087 Update Marathi translation 2019-03-09 11:02:45 +00:00
c6ef13d63f Update Basque translation 2019-03-09 10:01:29 +00:00
8cf4b03868 Update Basque translation 2019-03-09 09:02:32 +00:00
0ffebd18eb Update Polish translation 2019-03-08 19:42:37 +01:00
Ell
1ecbb94b2c app: take transform-grid handle size into account when readjusting
In the unified-transform, scale, and perspective tools, take the
maximal transform-grid handle size into account when readjusting
the transform, so that the handles themselves are fully within view
under arbitrary rotation, rather than just the corners.

(cherry picked from commit 46e16e175c)
2019-03-08 12:11:20 -05:00
127fc91603 Issue #3087: error compiling for Windows.
s/THREAD_MODE_ABOVE_NORMAL/THREAD_PRIORITY_ABOVE_NORMAL/
Thanks to Sylvie Alexandre for noticing and searching this.

(cherry picked from commit ebc3ef3c5e)
2019-03-08 17:36:13 +01:00
628960ed22 app: update fg/bg colors when committing a colormap change.
Since the color being currently edited is the selected one, it makes
sense that the fg/bg color should be updated appropriately.
2019-03-08 16:32:53 +01:00
d378f19390 app: fix a critical on a colormap editor callback.
On color update, check the existence of a context image before trying to
update the colormap.
2019-03-08 16:04:20 +01:00
c91d37eff2 Issue #3041: Color Picker no longer selects Colormap entry.
Do not take "Sample merge" into account when picking colors in a
single-layer image. The reason is to be able to get the index
information on indexed image. This information is lost otherwise when
using the whole image as a pickable.

Of course, other exceptions are possible, when you'd pick exactly a
colormap color, but I don't think it's worth making the code
extra-complicated for these. My previous commit will anyway already
select the right color in the colormap on common cases. Though it will
still fail to select the right index when several indexes store the same
color, on a multi-layer image, if you check "Sample merged" while the
right index was not the first one amongst the duplicates.

(cherry picked from commit 31b2b55b28)
2019-03-08 15:17:47 +01:00
eabe27421d Issue #3041: Color Picker no longer selects Colormap entry.
This is not the ultimate fix yet, but at least a first improvement.

(cherry picked from commit e47185bf11)
2019-03-08 15:17:47 +01:00
01990c4059 app: direct on-canvas color preview when editing a colormap color.
(cherry picked from commit a24957a804)
2019-03-08 15:17:47 +01:00
812a0f6689 app: save the accurate color in the colormap palette when possible.
The colormap saves colors as unsigned char, which can be very inaccurate
compared to high precision colors. When adding colors from GimpRGB into
the colormap, use the original value to fill the colormap palette
instead of making a round trip conversion from double to uchar, then
back to double.

This also fixes a direct bug I encountered when adding the current
foreground color in the image colormap. Yet the GimpFgBgEditor or the
GimpColorHistory would still show the color out-of-gamut in cases when
the returned RGB after the roundtrip was not close enough to the
original RGB (even despite using an epsilon in GimpPalette code).

(cherry picked from commit f1cca8ee2e)
2019-03-08 15:17:47 +01:00
ecd13f1456 app: update the GimpFgBgEditor when image colormap is updated.
(cherry picked from commit 8e8b4e82c1)
2019-03-08 15:17:47 +01:00
7812aced5d Issue #1256: Import damages colormap numbering.
Do not remove fully transparent colors from the PNG palette.
2019-03-08 15:12:04 +01:00
bee8543f44 Update Hungarian translation 2019-03-08 10:31:15 +00:00
1ff6d653a2 Update Marathi translation 2019-03-08 10:04:19 +00:00
225b8ac920 Update Marathi translation 2019-03-08 10:02:20 +00:00
114db4f60a Update Dutch translation 2019-03-08 09:57:16 +00:00
ba3d090882 Update Hungarian translation 2019-03-08 09:33:46 +00:00
Ell
79f030cf6c app: fix mnemonic of transform-tools "Readjust" button
... and make sure that the tool implements readjust() when
receiving a RESPONSE_READJUST.

(cherry picked from commit 5ff38e6859)
2019-03-08 03:46:17 -05:00
Ell
47a44106c2 app: reset overall transformation in transform tools
In GimpTransformGridTool, reset both transform directions in
response to the "Reset" button, so that the overall transformation
is restored to the identity.  Previously, we would only reset the
active transform direction (possibly compensating in the opposite
direction, if both directions are linked).  This was intentional,
but it's probably a bit too confusing, especially in conjunction
with the newly added "Readjust" button.  Let's just go back to
resetting everything.

(cherry picked from commit 2c67b29190)
2019-03-07 17:50:10 -05:00
Ell
21f76df21b app: fix unused variable warning in gimp_tool_gui_new()
... due to commit b23fae86f0.

(cherry picked from commit 7fb1d05ca4)
2019-03-07 16:49:03 -05:00
Ell
ab060c110f app: implement readjust() in various transform tools
Implement GimpTransformGridTool::radjust(), added in the previous
commit, in various transform tools:

The unified-transform, scale, and perspective tools readjust the
transformation such that the grid is centered relative to the view,
and its handles are fully within view under arbitrary rotation.

The rotate tool readjusts the transformation such that the pivot is
centered, and the grid is unrotated, relative to the view.

(cherry picked from commit 5e5118c1db)
2019-03-07 16:27:30 -05:00
Ell
a8292fedf2 app: add "Readjust" function to transform-grid tools
Add an optional GimpTransformGridTool::radjust() virtual function,
which subclasses can implement to radjust the transformation based
on the current state of the display, such that it's easy to
control.  This is especially useful when the image is zoomed-in,
and the transform handles, which are initially across the layer
bounds, are out of view.

When a transform tool implements radjust(), show a "Readjust"
button in the tool GUI.  While readjusting the transformation, we
modify the opposite transformation such that the overall transform
remains unchanged, as if both transform-directions were linked, so
that only the transform grid is readjusted.

(cherry picked from commit 5055dd10d5)
2019-03-07 16:27:29 -05:00
Ell
8d20b7c665 app: add gimp_tool_gui_add_button()
In GimpToolGui, add gimp_tool_gui_add_button() and
gimp_tool_gui_add_buttons_valist(), which allow adding dialog
buttons after construction.

(cherry picked from commit b23fae86f0)
2019-03-07 16:27:27 -05:00
ffe71f6c5b Update French translation 2019-03-07 11:40:45 +00:00
Ell
dfca360b66 app: various fixes to last commit
(cherry picked from commit caad9ca649)
2019-03-06 15:56:12 -05:00
Ell
977c4d0718 app: allow canceling line-art computation
Line-art computation can take a long time, and it's therefore
desirable for it to be interruptable.  While we do cancel the line-
art async when its result is no longer needed, most parts of the
computation don't respond to the cancelation request, leaving the
async operation running in the background, blocking subsequent
async operations.

Implement cancelation support of line-art computation, by passing
down the async object to the various functions, and periodically
checking for its cancelation at various points.  When the async is
canceled, we quickly abort the operation.

Even though cancelation now happens relatively quickly, some parts
of the computation are still uninterruptable and may incur some
latency, so we avoid waiting for the async opration to be aborted
after cancelation, as we did before.

(cherry picked from commit d8e69d66bc)
2019-03-06 15:24:18 -05:00
f73e13f49f Update Turkish translation 2019-03-06 19:06:27 +00:00
c6f2ad1bce Update Turkish translation 2019-03-06 19:05:07 +00:00
f84135e3d9 Update Turkish translation 2019-03-06 18:57:21 +00:00
7eae8e8cda Update Polish translation 2019-03-06 19:09:48 +01:00
8014fa6ba8 Update Spanish translation 2019-03-06 11:06:39 +00:00
Ell
d918502aac app: use gimp_gegl_buffer_copy() in various places
... instead of gegl_buffer_copy().  The former parallelizes the
format conversion.

(cherry picked from commit bb7f61c919)
2019-03-06 06:00:10 -05:00
9bbcaac5d2 Update Turkish translation 2019-03-06 10:55:30 +00:00
5f7d6951f7 Update Turkish translation 2019-03-06 10:54:15 +00:00
44703c03ff Update Turkish translation 2019-03-06 10:51:51 +00:00
Ell
cd159e4bd4 app: fix indepndent-async thread priority on Windows
Positive and negative priorities got swapped...

(cherry picked from commit 190095c97b)
2019-03-06 00:08:05 -05:00
Ell
08be2affee app: use independent async for resolving performance-log symbol information
... so that performance logs can be recorded during long-running
async operations, without those operations blocking the
finalization of the log.

(cherry picked from commit 652a2a90cf)
2019-03-06 00:02:11 -05:00
Ell
a3cd8c96d0 app: add gimp_parallel_run_async_independent_full()
... which is equivalent to gimp_parallel_run_async_independent(),
except that it takes an additional "priority" parameter, which
specifies the task's priority, with 0 being the default priority,
and lower values indicating higher priority.  Unlike
gimp_parallel_run_async_full(), the priority parameter doesn't
directly control the task's priority in a queue, but rather, we use
it to control the priority of the task's dedicated thread, on
supported platforms (previously, all independent async tasks would
run with low priority.)

Use low priority when loading fonts, which can take a long time, to
keep the existing behavior.

(cherry picked from commit fa2e4dcce0)
2019-03-06 00:02:10 -05:00
Ell
a465b9c341 app: clean up last commit
Remove gimp_item_tree_clear(), added in last commit, and move its
code to gimp_item_tree_dispose().  Likewise, in
gimp_image_dispose(), use g_object_run_dispose() on the image item-
trees, instead of gimp_item_tree_clear().

(cherry picked from commit b0de51b6bf)
2019-03-05 16:42:50 -05:00
Ell
c76076ec14 app: fix segfault when closing an image with a floating selection
Add gimp_item_tree_clear(), which removes all the items of a
GimpItemTree, and clear the layers/channels/vectors item trees in
gimp_image_dispose(), *before* finalizing the image, so that the
corresponding items' desctructors are called while the image is
still alive.  In particular, this allows the destructors to safely
call gimp_item_is_attached(), which happens when the image has a
floating selection, since commit
8d4e5e0ff7.

(cherry picked from commit d7e3a1e226)
2019-03-05 09:33:07 -05:00
Ell
4eda127c52 Issue #3062 - Picking by hue using "Select by Color" goes awry ...
... in GIMP 2.10.9 from git

In gimppickable-contiguous-region's pixel_difference() function,
which is used, among other things, by the select-by-color and
fuzzy-select tools, when selecting by LCh/HSV hue, treat a pair of
colors as inifinitely far apart if one of them has positive chroma/
saturation, and the other has chroma/saturation that's very close
to 0; conversely, treat a pair of colors as equal if both of them
have chroma/sautation that's close to 0.

As a result, when the seed color is saturated, gray pixels are
never selected, while when the seed color is desaturated, all, and
only, gray pixels are selected.

(cherry picked from commit 9886b69dac)
2019-03-05 09:01:45 -05:00
9173e42274 Update Turkish translation 2019-03-05 00:35:09 +00:00
51585bb802 Update Turkish translation 2019-03-05 00:32:28 +00:00
71800dfd21 Update Turkish translation 2019-03-04 22:18:28 +00:00
00c3c068d0 Update Turkish translation 2019-03-04 22:12:56 +00:00
28232d166c Update Turkish translation 2019-03-04 21:34:57 +00:00
07080d4540 app: improve line art filling when clicking on a line art closure.
When clicking on a line art pixel, only this pixel gets colored, which
is fine for actual (original) line art pixels. But on generated ones
(closure pixels, which are internal only), you end up with a single
pixel colored while the whole surrounding area is empty. This feels like
a bug (even though it was not one technically) as you have no way to
guess you are clicking on a closure pixel.
Instead, when this happens, simulate clicks on all neighbour pixels,
hence potentially coloring all surrounding regions, which is most likely
what you wanted.

(cherry picked from commit f310db6c21)
2019-03-04 19:01:44 +01:00
03744e3012 app: fixing the line art GimpBusyBox visibility.
Commit bc187cc5cc was a bit wrong as it was possible to get some race
conditions when changing settings quickly in a short time frame.

(cherry picked from commit 3a317e72aa)
2019-03-04 19:01:44 +01:00