Commit Graph

53416 Commits

Author SHA1 Message Date
555ce20248 libgimpwidgets: GimpColorDisplayStack made final. 2024-10-16 22:30:49 +02:00
85c989da1e libgimpwidgets: GimpColorDisplay is an abstract class.
It is a shared API for subclasses and is not meant to be instanciated
directly.
2024-10-16 22:30:49 +02:00
ba3f0c73a4 libgimpwidgets: GimpColorArea made final. 2024-10-16 22:30:49 +02:00
925faf83ac libgimpwidgets: GimpChainButton now a final type too. 2024-10-16 22:30:49 +02:00
03b88d8ac0 libgimpwidgets: GimpCellRendererToggle now final. 2024-10-16 22:30:49 +02:00
3728e37553 libgimpwidgets: make GimpBrowser final. 2024-10-16 22:30:49 +02:00
0a9020bb0a plug-ins: Fix IFS Compose crash related to undos
As part of the color space invasion, we
converted the IFS Compose colors to
GeglColor. However, we forgot to initialize
them when we create a new AFFElement
in undo_update (). As a result, when we
try to clear them out later in aff_element_free (),
the plug-in crashes.
This patch resolves the issues by initializing
the five GeglColors on creation.
2024-10-16 20:01:06 +00:00
af8cc019e3 core: Rename gimp_drawable_has_filters ()...
...to gimp_drawable_has_visible_filters ().
With NDE filters, it's now possible to have
filters that are not active but still attached
to a layer. This patch renames the API to
prevent confusion as seen in prior
commits.
2024-10-16 14:17:55 +00:00
c19f6509ea core: Update XCF version even if layer effects are inactive
Similar to afc0a6d1, we need to use gimp_drawable_get_filters () to
get the total number of filters rather than gimp_drawable_has_filters (),
which just returns if any filters in the stack are active/visible.
Because of this, we weren't updating the XCF version to 22 when we
saved a file that had all of its layer effects set to invisible/inactive.
2024-10-16 13:32:56 +00:00
e5f217b3d0 Update Brazilian Portuguese translation 2024-10-15 16:35:26 +00:00
3cc3688f21 NEWS: update. 2024-10-15 15:38:38 +02:00
3ee7a922af Issue #10998: more cases where fg/bg color was not properly updated.
Always update stored colors. When colors are perceptually identical, we
only bypass color rendering code, but not the color value update (even
small value updates need to be echoed across the code, so that what is
shown is always what is set).
2024-10-15 15:23:11 +02:00
56add53473 Update German translation 2024-10-15 05:48:58 +00:00
ab6f4e9a34 app/tools: Fix split preview when different layer selected
With NDE, we can now edit a filter when another layer is selected. This
broke an assumption in GimpFilterTool that the selected layer is the same
as the layer the current filter is applied to.
This patch fixes the problem by checking if the filter is being editing, and then
using either the filter's drawable or tool->drawables->data accordingly.
2024-10-14 23:58:41 +00:00
5778d9353a build/linux: Restore 'gjs' bundling in AppImage
This got lost in a988084a
2024-10-14 17:48:35 -03:00
dc08645614 build/linux: Rectify comment about WMF support on AppImage
The previous comment is wrong, because GIMP never had WMF export. Let's
clarify, however, that WMF support is still tricky because of some
options available at configure time regarding 'fontmap' and so on.
2024-10-14 16:05:33 -03:00
47852ef90f build/linux: Do not impose 'GIMP3_DIRECTORY' var on AppImage's AppRun
This var points to a dir that exists outside of the AppImage bundle and it
exists to be customized if needed. So, let's not impose it in the AppRun.
2024-10-14 10:43:29 -03:00
dffefa1b67 gitlab-ci, build/windows: Do not build unneeded dist assets on CI
There is no need to generate Installer assets on Store (and vice versa) or
on build-only pipelines. Let's build only the necessary, mitigating #11385
2024-10-13 20:59:06 -03:00
1889f554d7 ScriptFu: scripts: revert changes to SF-TOGGLE args
Prior commits porting these scripts to v3 dialect
incorrectly compared SF-TOGGLE args to #t and #f.
They are bound to TRUE and FALSE, 1 and 0,
before choice of dialect can take effect.
2024-10-13 14:28:46 -04:00
ff1ad6d605 ScriptFu: update devel docs re version 3 changes 2024-10-13 14:28:46 -04:00
1384bf8c28 build/windows: Streamline MSIX script "Arch:" output with Installer one
This is a more informative output about what msix is being generated.
2024-10-13 14:05:27 -03:00
95518b6ba3 app: show clearer we are working in sRGB space.
This was already the case because gegl_operation_get_format() had no
space (i.e. default, sRGB). it's not the source format.
But let's make it clearer because otherwise on a short skimming, it
looks like we are working on the source space.

Also adding a comment on why working on the source space is not a good
idea right now anyway (it's *very* slow for anything but sRGB).
2024-10-13 17:55:59 +02:00
9a6b93c4a5 build/windows: Add (optional) WACK phase to MSIX script
Local certification with WACK is optional and useful to anticipate if
the MSIX will be refused by Partner Center's online certification.
(Just to note: On Windows SDK, certification is not equal to signing.
It's more a checklist process to see if the package is suitable to run.)

To avoid needing the full script to be run with admin rights (which
would be scary) this feature only works with a bunch of requirements:
1. sudo for Windows (so Windows 11 24H2)...
2. enabled in normal (aka inline) mode...
3. in a Windows account in admin group

The 2nd and, specially, the last one are harsh but this is sudo's design:
https://github.com/microsoft/sudo/issues/108
https://github.com/microsoft/sudo/discussions/68
2024-10-13 15:40:39 +00:00
e1f31247e2 app: Color Balance to work in HSLA/sRGB.
Running Color Balance on an image with profile was very slow.
This is because we have special conversion path for sRGB "R'G'B'" in
babl (since babl@90da256), but all the other color spaces are going
through the generic path which does the double conversion to linear RGB
then to 2.2 gamma. And that's slow.

I'm not 100% sure it's right, especially as I'm seeing some CLAMPing
going on (but I'm not sure if removing it is right either) which means
we will likely not cover the full target space in the end.

I'm letting it go because when we'll add proper version support to GEGL
ops, we will be able to improve the algorithm without breaking XCF files
with this filter.

At least now we don't have over-slow Color Balance.

As side improvements, I'm cleaning up a bit the code, which is mostly
micro-optimizations at this point.
2024-10-13 17:01:50 +02:00
0b7c2d39f4 libgimpcolor: Remove GimpHSL and GimpRGB
This completes the GimpRGB API removal
project for the color space invasion.
Note that the GIMP_RGB_LUMINANCE macro is
temporarily moved to gimpcolor. It does not
require GimpRGB but was included in gimprgb.h.
2024-10-13 16:56:20 +02:00
3cfadbf078 operations: Replace GimpHSL in Color Balance operation 2024-10-13 16:56:20 +02:00
0a7119028f gitlab-ci: Use mirrored flatpak*.yml to stop pipeline fails due to sick infra
We are getting HTTP error 429 probably because it's a highly requested file,
and this is causing pipelines to fail at CI lint. Let's fix this with mirrors.
2024-10-13 11:34:47 -03:00
9ea4120f78 Update German translation 2024-10-13 14:22:21 +00:00
d28525e141 Issue #12146: default to HSV Hue for GimpColorSelect.
Commit abf0c1c272 fixed the inconsistency of showing "R" for RGB's Red
channel selected whereas the actually displayed selection UI was "H" for
HSV's Hue channel.
As a consequence of this fix, now we were indeed displayed "R". Yet
people got used to working with the Hue channel (and LC plane) for
at least a dozen years. Let's make "H" the officially displayed channel.
2024-10-13 15:38:36 +02:00
41d417530e plug-ins: Re-center Animation Playback display
During the GAction port, we removed gtk_alignment_new () from the
Animation Playback plug-in as it was deprecated in GTK 3.14.
However, this caused the drawing area to be put on the left side of
the window.
This patch reimplements the alignment feature using gtk_widget_set_halign ()
and gtk_widget_set_valign (), to keep the animation in the center of the dialogue.
2024-10-13 03:44:20 +00:00
d3dbcb1907 app/actions: Restrict destructive filters on layer groups
Resolves #12160
Currently, GEGL Graph and filters with Aux nodes can only be
applied destructively. Therefore, we need to add a restriction so
they can't be applied when a layer group is selected.
2024-10-13 02:25:14 +00:00
4698c67290 libgimpwidgets: Convert more widgets to FINAL/DERIVABLE TYPE
These were missed earlier as they did not
have private structs in the .h file
2024-10-12 20:17:29 +00:00
0f0b3a65be tools: Update existing filter when converted
Certain tools like Levels and Brightness-Contrast allow you
to convert it to another filter live. This happened by creating a new
tool, so if you were editing an existing filter, the connection was lost
and duplicate filters were created.
This patch copies any existing filter to the new tool and updates the
name and icon to the new filter type when saved.
2024-10-12 18:43:33 +00:00
6b13a097ab build/linux: Bundle complete GTK and ISO locales as in Windows bundling script
Since the 'bund_usr' is now smater, we can have parity with Windows bundle.
2024-10-12 10:32:44 -03:00
70cd0c7b77 plug-ins: Fix Curve Bend auto-preview
During the GimpProcedureDialog port, newly generated widgets were
connected to bender_global_notify (). However, GimpProcedureConfig was
connected to it rather than a GtkWidget, which caused the function to return
without updating since it did not have access to the BenderDialog object.
This patch connects the function to the individual rotate, smoothing, and
anti-aliasing widgets to resolve the issue.
2024-10-11 12:16:28 +00:00
eddaa13ad5 Update Catalan translation 2024-10-11 11:59:33 +02:00
ec80baf414 app/core: Only restrict palette for indexed images
Moves gimp_palette_restrict_format () call to after check for
private->palette not being NULL, so it doesn't run for
RGB/Grayscale images.
2024-10-11 08:55:15 +00:00
bf513fac4d NEWS: update. 2024-10-11 01:49:19 +02:00
6fe83ee785 build: add the missing entry for the new Bengali language support.
Also add some header text as guidelines on how to fill in a new language
so that we don't have to search each time.
2024-10-11 01:40:19 +02:00
be23a0573b build: also test missing langs in build/windows/installer/lang/iso_639_custom.xml
This file was added in commit 21ffb58903 to replace the list in
4_dist-gimp-inno.ps1. The older list used to be verified for missing
langs in the test-installer-langs.sh unit test, but the test was removed
and never replaced. This is why now when a new language is added and it
is missing in iso_639_custom.xml, it goes unnoticed until failing in
dist-installer-weekly job.
2024-10-11 01:40:19 +02:00
be67c70a89 build/linux: Add "Image Graph" support to AppImage
To we properly bundle graphviz, the 'bund_usr' function was improved.
2024-10-10 09:29:29 -03:00
5fc2d58ad4 libgimpwidget: clean out a forgotten signal method. 2024-10-10 11:50:56 +02:00
a040dfd6e4 Issue #11339: color selection sliders don't always update for slow increments.
Rather than the previously reverted commit, the proper solution is:

* gimp_color_selector_set_color() must not test for perceptual identity
  because GimpColorSelector is too much of a generic class. In some
  case, such a test may be worth it to limit costly updates (in
  particular when it implies some rendering of color surfaces), but this
  would happen in specific subclasses.
* In GimpColorSelection, the GimpColorScales show numbers, so any change
  in them will likely trigger other scales to change as a side effect.
  Therefore when handling the "color-changed" signal on these scales,
  however small the change may be, we want to run the update.

Now removing this test in gimp_color_selector_set_color() also revealed
a serious bug which I fix in this commit, which is that the binding
between the "value" of a GimpLabelSpin with the "value" of its
adjustment was still triggering repeated property-setting, which was
enough to freeze the GUI for a while. The logic of using only the
GtkAdjustment's value as a source while also binding both properties was
not robust enough. Instead the GimpLabelSpin will now store its own
value and the binding will simply keep it in sync with the one in the
adjustment.

Note that this is also part of the solution for #10998, because it means
there were cases where the color displayed in scales of the color
selection dialog was not actually the color set as foreground or
background.
2024-10-10 11:50:56 +02:00
079a68a920 Revert "libgimpwidgets: fix #11339 chroma slider fail on small increments"
This reverts commit bdddc94151.

This commit was not fixing the issue the proper way and was creating new
issues.

The real problem was that for very small increments at a time, a color
change could be perceptually identical to the previous color and
therefore not trigger color updates down to subclasses.
The reverted commit was trying to work around this by not updating the
GimpColorSelector color when it was perceptually identical (therefore
next check may be a bigger color distance), but this was definitely not
right. It was creating inconsistency in the stored color with the
actually selected one and that was the root for more issues.

See the next commit for a proper fix.

Oh and by the way, there was no leak, unlike what the reverted commit
message was saying. The old color was freed. ;-)
2024-10-10 11:50:56 +02:00
abf0c1c272 libgimpwidgets: make sure that the selected channel is in sync with reality.
By default, the GimpColorSelect widget is set to show HSV with Hue
selected but we weren't selecting the channel which was defaulting to
"Red" of RGB. Therefore there was some inconsistency when first opening
the color selection dialog which was showing HSV colors on the left, yet
with "Red" selected on the right.

This fixes the inconsistency, which also allows parent or container code
to set the default they want (which is indeed RGB).
2024-10-10 11:50:56 +02:00
b1616cfaaf libgimpwidgets: argh, silly bug. 2024-10-10 11:50:56 +02:00
e8958e417c libgimpwidgets: show the model in the GimpColorSelect label.
Do not only show the space, but also the model. For instance both RGB
and HSV can have the same profiles.
As for LCH, we must not show any space (it is based on CIELAB).

Note that I use the string "Model: %s" which is already used in
libgimpcolor, so I am not breaking string freeze. The "%s - %s" string
though is not localized, even though ideally it should be (and possibly
even be a better joining string in English), but I don't want to break
string freeze for this.

This issue is part of the fix for #10998, more as a UX issue than a bug
per-se. Depending on how you were selecting a color, now you might
select it as HSV, LCh or some other model (this was **not** the case
before, even though the GUI was similar. Yet the stored color was always
RGB. Now it's actually "whatever you choose"). As a consequence, it is
possible that choosing a color in another model may convert to slightly
different numbers, especially within decimal places. I don't think it
was the main issue, but it certainly doesn't help. Now we may be making
clearer what color model is being used in the GimpColorSelect color
areas.
2024-10-10 11:50:56 +02:00
d66df2aefe libgimpwidgets: do not set toggles visible when explicitly set not to…
… when changing the model.

Because of this, we had redundant toggles appearing in the Color
Selection dialog, in the GimpColorSelect tab.
2024-10-10 11:50:56 +02:00
d607a71ba6 Update Chinese (Taiwan) translation 2024-10-10 03:40:58 +00:00
2d64312474 Update Chinese (Taiwan) translation 2024-10-10 03:32:42 +00:00