Commit graph

2561 commits

Author SHA1 Message Date
Alx Sa
6369574261 dialogs: Make Metadata Rotation images clickable
This patch makes it so that you can click the preview for
Original and Rotated images in the Metadata Rotation Import Dialog,
and have it open the image rotated as shown in the preview.
This supplements the existing button options, and matches how other
software works.
When hovering over the images, the cursor turns into a pointer to
further suggest it is clickable.
2026-03-27 21:21:39 +00:00
Alx Sa
8e4e83911c dialogs: Set "Quit Save" icon size based on theme
The "Save"/"Save as" icons that appear in the Quit
Dialog when there are two or more images with unsaved
changes were always sized as GTK_ICON_SIZE_MENU,
or 16px, regardless of icon theme settings.

This patch adds code on Quit Dialog creation to check
the current theme and update the icon size accordingly
via `quit_style_updated ()`.

Note that this is a limited implementation due to the pending
release of GIMP 3.2. It is not connected to notify::custom-icon-size
signals to reduce complexity and potential issues.
In the future, we may move this to the parent GimpMessageDialog
if other dialogs would also benefit from getting a button icon size from
the theme.
2026-03-09 01:53:00 +00:00
Alx Sa
918aea3df5 dialogs: Replace custom widget in Path Export dialog
This patch replaces adding a custom widget
to the Path Export dialog with a built-in
combobox from gtk_file_chooser_add_choice ().
This makes our code more compatible
with a future port to native file dialogs
in GTK3, without a loss of functionality.
2026-02-25 21:35:52 +00:00
Alx Sa
7bebb1d36b dialog: Reorder options to match dialog
The Canvas Size dialogue and the default options
for it in the Preferences dialogue were listed in
opposite order. This patch puts them in the same
order as the Canvas Size dialogue (Fill with, then
Resize Layers) to keep them consistent.
2026-02-19 13:27:50 +00:00
Alx Sa
dbc1c55de4 core, dialog: Add Procreate swatches import support
Procreate swatches are zipped JSON files.
They contain an object array of HSB
color palette values. Newer versions of the
format also support different color models,
spaces, and color profiles.

This patch adds support for importing the
palette name, colors, and associated color
profile in the original HSB format.
2026-02-12 01:49:47 +00:00
Jehan
9417565ea2 Issue #15575: add arg to color button prop widget to choose context awareness.
In particular, for indexed images, color choice will happen within the
colormap.

The following uses are made context-aware:

* Test tool options color;
* Fill colors.

These other uses will not be context-aware:

* Padding, quick-mask and padding colors;
* Out-of-gamut colors;
* Generically generated color buttons (e.g. in filter dialogs);
* Foreground selection's mask color;
* Grid colors.
2026-02-03 13:10:41 +01:00
Jehan
76a255caa1 app: take into account possibility of NULL error.
Normally the error should not be NULL if file_open_layers() returns no
layers. But just in case, in order not to crash when we could avoid it,
let's double-check.
2026-01-09 21:35:31 +01:00
Alx Sa
897ffd5702 dialogs: Canvas Size fill combo set to insensitive...
...if layers won't be resized.
This patch adds code to check if the
"Resize layers" option is set to None and
"Resize Text Layers" is turned off. If so,
then the "Fill With" combobox is not
needed and will be set to insensitive to
reduce confusion. Otherwise, the fill combo
is set to enabled.
2025-12-26 16:29:14 +00:00
Anders Jonsson
1b025aa8f2 dialogs: add missing space in keyboard shortcuts dialog 2025-12-17 13:37:51 +01:00
Jehan
a34907987f app: minor spacing cleanup. 2025-12-14 02:17:04 +01:00
Gabriele Barbero
43f0ab8ba4 dialogs: make the keyboard shortcuts dialog hint more informative
This commit updates the hint in the keyboard shortcuts dialog to provide
more detailed instructions on how to edit shortcut keys. The hint now
explains that users need to click on the "Shortcut" column of the corresponding
row to type a new accelerator or press backspace to clear it.
See: https://gitlab.gnome.org/Teams/GIMP/Design/gimp-ux/-/issues/594
2025-12-08 13:48:15 +01:00
Jehan
4ff7fc9003 Issue #15273: New Layer Dialog is missing controls for setting layer offset. 2025-12-05 21:53:40 +01:00
Sabri Ünal
3027db96ff dialogs: "Maximum Image Size" changed to "Maximum new image size"
Because of the real GUI string is "Maximum new image size", this patch
was necessary.
2025-11-08 08:56:48 -03:00
Jehan
1235bf00bd app: factorize auto-rename code into GimpRasterizable.
Rasterizable objects are all created from some side data and can be
renamed automatically based on this data (from the link file for link
layers; from the path for vector layers; from the text for text layers).

So let's share code.
2025-10-22 22:29:19 +02:00
Jehan
1a73a4ddc6 app: edit vector layer with path tool as default edit action.
- Getting rid of the dedicated vector layer options dialog (with fill
  and stroke settings) which appeared when double-clicking on a vector
  layer. This is a duplicated with the Path tool options.
- Double-clicking a vector layer instead will simply start the Path tool
  (same as double-clicking a text layer starts the Text tool).
- The path choice settings only is missing from the Path tool options.
  Instead of moving it there, I move it to the generic layer options
  dialog. I don't think it's the kind of setting you really change often
  (most of the time, you likely just make a new vector layer).
- Offsets are ignored too and hidden for vector layers.
- Also making sure that the path changes shows live when editing the
  setting in dialog, but it is properly reverted if canceling the
  attributes edition.
- Also make sure the undo step changes the path back.
2025-10-22 19:33:58 +02:00
Jehan
f5b94bdc03 app: we also have alias links for RC releases. 2025-10-07 23:34:55 +02:00
Jehan
baa4825880 app: use the new release/ alias URLs for the "Learn more" link of…
… Release Notes tab.
2025-10-01 14:40:18 +02:00
Bruno Lopes
789af76a32
app: Move "Documentation" link one line up over (community) "Tutorials"
Users were thinking the tutorials are some kind of official docs,
but they are not maintained as the official GIMP help website,
they are more like informal documentation about GIMP made public.

Let's clarify this reordering the buttons.
2025-09-29 07:32:12 -03:00
Jehan
5a22a9b931 app: make sure we don't crash dereferencing a NULL GError.
I think most, if not all, failure cases of file_open_with_proc_and_display()
should allocate a GError by now. But just in case we missed some edge
case, better not crash.
For instance, we were crashing when opening a remote file because of
this line before the previous commit was pushed.
2025-09-24 19:15:47 +02:00
luzpaz
91418131a0 app, libgimp*, pdb, themes: Fix description typos
This patch fixes minor typos in user-facing descriptions
and internal comments found by Codespell.
2025-09-24 16:50:15 +00:00
Jehan
789d82355c app, pdb: "Add Layer Mask" dialog asks whether to edit mask immediately.
While there are cases when you want to edit the mask straight away (this is
often the case when starting with a white or black mask), in many other cases,
the mask may be already as you want it per its initialization (e.g. when
initializing with a channel, selection, the alpha channel, etc.).

Until now, the Add Mask dialog was always switching to the "Edit Layer Mask"
mode by default, which forced an additional unneeded click each time you created
a mask (and were in a case where you initialize the mask as you want it
directly).

Now adding "Edit mask immediately" feature in the "Add Layer Mask dialog":

* It's checked by default to keep historical behavior.
* As most other dialogs, the last value is remembered, allowing people with
  repetitive workflow not to have to repeatedly set the settings each and every
  time.
* This default is also visible and settable in Preferences > Interface > Dialog
  Defaults.
2025-09-22 22:04:32 +02:00
Jehan
a0676125a1 app: fix build warning on Windows.
Fixes following warning, seen on CI:

> ./app/dialogs/about-dialog.c:549:7: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
2025-09-21 22:46:48 +02:00
Alx Sa
3e96397770 dialogs: Add palette format filters to import dialog
GIMP supports importing a number of palette formats
such as Adobe Swatch Exchange and SwatchBooker.
However, this is not immediately apparent from the import
palette dialogue.
This patch adds the currently supported palette formats as
filters in the dialogue, both to let users hide irrelevant files from
view and to highlight which formats we support.
2025-09-08 01:40:41 +00:00
Jehan
4f3aee5e83 Issue #14759: link layers (of vector files) initial dimensions will fill…
… the whole canvas while keeping aspect ratio of the source image.

The previous dimensions were not entirely "out of the blue" since they
were taken from the file, but very often dimensions from vector images
are kinda bogus (apart from aspect ratio, they don't mean much) anyway.

Now we will just fill the canvas box by default.

When changing the source file of an existing link layer though (through
Link Layer properties), the dimensions will be within the current layer
bounding box.

Also I realized that we need to also store the link width/height in the
XCF because the buffer width/height may not be right (in case a
transform matrix was applied). This commit therefore breaks XCF file
with link layers made in the last 2 days. Since we have not made even a
dev release, it's probably fine to do this and not bump the XCF version.
2025-08-28 23:13:03 +02:00
Jehan
66cdecb0fa app, menus, pdb: new file-open-as-link-layers action.
Revert the logic of opening all files as link layers back into loading
their current content as normal layers.
Instead just add a new action dedicated to open images as link layers
and add it to the File menu.

Per UX discussions with Aryeom.
2025-08-27 11:34:04 +02:00
Jehan
4128c789f9 app: more efficient GimpLink rendering.
We now re-render a link (by loading its file) immediately upon setting
the new file, i.e. during the calls of gimp_link_new() or
gimp_link_set_file(). As part of this change:

* A GimpLink now stores a GeglBuffer. And this is changed each time a
  file change happens (per the GFileMonitor). In particular that also
  means that gimp_link_get_buffer() does not reload the image file at
  each call for no reasons, and gimp_link_is_broken() does not have a
  `recheck` argument either. This is much more efficient.
* These 2 functions also have a GimpProgress and GError now. We use this
  among other things to pass on a specific GimpProgress object. In
  particular, the image file dialogs now show correct loading
  progression again.
* As a general rule, the code is less confusing as we don't have to
  wonder whether a GimpLink is ready. We can assume it always is, from
  now on.

Note that gimp_link_duplicate() does not trigger a reload of the image
file. Since we assume that the source GimpLink is supposed to be
up-to-date already, we just copy its buffer as-is as an optimization.
2025-08-27 11:34:04 +02:00
Jehan
9b0f426fbd app: all images (except remote files, XCF and compressed XCF) opened as links.
This is still mostly a test of workflow. It is based on the idea that
link layers are normal yet enhanced layers: eventually we should be able
to have some improved less-destructive scaling/rotation (even without
NDE transform effects); you can manually drop the link anytime anyway
(hence getting back to the good old fully destructive workflow); any
pixel editing automatically drops the link too.

Now this still raises quite a lot of questions:

* The link can be confusing to people used to the old way and they may
  not realize that editing the original file separately would also
  update the render in this file (which may not be what they wanted;
  maybe they just wanted to grab a snapshot of this file at a given
  time).
* You could also want to link XCF files.
* You could also want to link remote files (especially in a controlled
  network environment).
* Linked images are currently taken as a whole; we definitely want layer
  support to handle multi-layer image formats (so that you could link
  only a single layer, or a collection of layers; do we want to be able
  to edit visibility of linked layers separately too? Would be neat). So
  how would we handle automatic linking when opening a file? Maybe we
  just reproduce the layer structure as link layers (one link layer
  monitoring only one layer from the linked file)?

Anyway this is work-in-progress, UX-wise.
2025-08-27 11:34:04 +02:00
Jehan
674939e225 app, libgimpbase, pdb: rework layer dialog.
This commit changes the following:

- It's now possible to set whether to store an absolute or relative path
  when editing link layer properties.
- New layer dialog doesn't propose an "Image link" fill type anymore.
  Link layers won't be created this way (see in a future commit).
2025-08-27 11:34:04 +02:00
Jehan
a60487aedd app: link layers can now be stored with relative or absolute paths.
By default, we set them as relative paths. This seems like the more
practical and allows for relocatable folders when one work with project
folders containing all their assets.

We don't have yet a way to set this to being absolute path, but it will
come in a further commit.
2025-08-27 11:34:04 +02:00
Jehan
20083bcabe app: new link layers.
These are layers who content depends on another source (right now only
an external image). This can be useful when for instance working at
several people on a single artwork, hence being able to load new
versions of an image without even touching anything in the XCF (for
instance, say you draw an animated character while someone else is
taking care of the background).

Similarly to what we do for text layers, once you start modifying the
contents, it turns into a "normal" layer. The link information is still
available though, so it is possible to revert to the monitoring state
with the menu item "Monitor Linked Image" which appear when a link layer
became a normal layer.

This is not finale as I'm still experimenting. In particular, I have not
implemented XCF saving/loading yet for this new layer type.
2025-08-27 11:34:03 +02:00
Michael Natterer
c2195a24ca app: redo preview backgrounds completely
While there is a style "background color", the idea of a "widget
background color" is completely bogus, the widget background can be a
gradient or whatever.

- Get rid of "background" in GimpViewable's preview API, only leave the
  "foreground color" there for things like brushes or fonts.
- In GimpViewRenderer, add the background types to be used to class and
  instance, so each renderer type can choose what it needs.
- Render all previews to alpha surfaces, and do the background
  for all renderers generically in gimp_view_renderer_real_draw(),
  then render the preview surface on top of it.
2025-08-18 14:05:54 +02:00
Alx Sa
a1cd2a2588 path, tools, pdb: UX updates to vector layers
This patch improves vector layer UX based on feedback.
In summary:
* Makes vector layer editable from the Path tool
* Adds initial PDB for creating vector layers in scripts
* Size vector layers to the path size, rather than image
* Transform tools utilize the path for resizing
* Path tool automatically selects vector layer path
2025-08-17 02:20:19 +00:00
Henk Boom
60ed90e10a vectors: Implement vector layers from GSoC 2006
Ports the work done by Hendrik Boom, Martin Nordholts, Gilles Rochefort,
and Jacob Boerema to Gimp 2.99/3.0.
2025-08-17 02:20:19 +00:00
lillolollo
52ffd75330 Issue #14689: Add translation context for Extensions
Extensions is used both for file extensions and for
GIMP's planned Extension format. This patch adds translation
context so translators know which one we're referring to.
2025-08-16 19:54:31 +00:00
Michael Natterer
caa0df8e22 app: use GipmRow for the recent files on the welcome dialog. Enables
correct aspect ratios and popup previews, and removes lots of code.
2025-08-14 16:53:02 +02:00
Jehan
048c86ffcf app: properly escape characters which need to be.
This fixes handling of text with for instance an ampersand (as in the
next AppStream release note listing).
2025-08-13 19:41:32 +02:00
Gabriele Barbero
c3d01854b3 dialogs: use core actions for opening images and new files
This commit changes the welcome dialog to use core actions for opening
images and new file. This allows to avoid code duplication.
2025-08-12 18:03:54 +00:00
Gabriele Barbero
d932d02fbe dialogs: implement shortcuts in the Welcome Dialog
This commit adds support for activating user-defined keyboard shortcuts in the Welcome Dialog to:
- Create a new file
- Open a file
- Open one of the 10 most recent files
2025-08-12 18:03:54 +00:00
Michael Natterer
795cf081cc app: use a GimpContainerListView in the layer options dialog. 2025-08-11 16:09:35 +02:00
Jacob Boerema
877d5b0c1a app, libgimp, libgimpbase: Add preference to allow saving and updating extra metadata
Closes #5856 - provide a way to export images without adding or
changing any metadata.
Handles issue #3490 together with !2367. The latter makes sure that
an image comment when present is favored over similar metadata tags.

This commit makes sure that when you disable the preference to
update metadata automatically, it does not synchronize the
image comment with similar metadata tags (possibly overwriting other
metadata), it does not update the modification date, and does not
add or update software and change history metadata.

This adds a metadata preference (enabled by default) that on export
determines whether we add and update some non essential metadata.

When this setting is disabled, we only touch the metadata that we
cannot avoid (e.g. updating size, presence of thumbnail, etc.).
2025-08-08 13:41:19 -04:00
Michael Natterer
33bfd5a12b app: implement GimpContainerListView, using a GtkListBox
It completely relies on GListModel and doesn't manage any list items
itself. The port should be pretty much feature-complete.

Add a ton of stuff to GimpRow in order to look and behave like a
GimpContainerTreeView row.

Add a playground switch to use the new widgets in all views that can
be switched between list and grid view (brushes, patterns etc.)

Please test!
2025-08-05 16:13:01 +02:00
Joey Riches
8277817b62 app: Port from appstream-glib to appstream
From the horse's mouth:
"WARNING: appstream-glib is heavy maintenance mode, use appstream
instead"

Additionally, appstream-glib no longer conforms fully to the
appstream specification.

Some care is taken to taken to support both libappstream 1.0 as well
as libappstream 0.16.x to support stable distros.
2025-08-04 18:56:42 +00:00
Michael Natterer
b416994ed0 app: make GimpContainerView behave like a normal widget
The old API to select stuff and its signals was doing unexpected
stuff and was very confusing. Change things to be "normal":

The selection API is now set_selected() and get_selected(), with no
internal data exposed, and set_selected() emitting the expected
signal.

The signals are now "selection-changed" and "item-activated".
"selection-changed" is always emitted in response to changing the
selection, be it via the API, or by changes in the model (the internal
callbacks in from e.g. GimpContext or GimpImage simply call set_selected()
and don't do any unxpected magic).
2025-08-01 10:02:37 +02:00
Gabriele Barbero
0551b4be1d app: implement system color scheme detection on MacOS
Following Linux and Windows implementations, this commit add the
system color scheme detection on MacOS, enabling the "System Colors"
setting also on this OS.
2025-07-25 19:03:24 -03:00
Gabriele Barbero
83dcd00794 dialogs: respect time/date system format on Windows
Fetch date and time via GetDateFormatEx/GetTimeFormatEx to respect
the user's custom formats from Windows Region settings instead of
falling back to C locale defaults.
2025-07-25 15:13:08 -04:00
Gabriele Barbero
180736f772 dialogs: respect time/date system format on macOS
When the time or date format is changed from macOS system settings,
these changes do not affect the locale but the user preferences.
This commit ensures that the date and time are retrieved directly from
those settings, respecting the selected format.
2025-07-25 15:13:08 -04:00
Michael Natterer
6eae69d2a4 app, pdb: rename gimp_container_get_children_type() to get_child_type() 2025-07-18 08:19:13 +02:00
Alx Sa
bb9d36d8ae dialogs, widgets: Check if animations are enabled...
...when setting animations for GtkStack.

Adds a check if gimp_widget_animation_enabled ()
is TRUE before setting an animation type in
gtk_stack_set_transition_type (). If it's FALSE,
then we turn off animations with
GTK_STACK_TRANSITION_TYPE_NONE.
This affects the Input Controller dialogue,
Preferences dialogue, and the Welcome
dialogue.
2025-07-17 20:56:16 +00:00
Michael Natterer
246f9d284f app, pdb, libgimp: use "#pragma once" instead of:
#ifndef __FOO_H__
 #define __FOO_H__

 /* declarations  */

 #endif /* __FOO_H__ */

And some cleanups while I saw the headers.
This is far from finished...
2025-07-13 03:21:37 +02:00
Michael Natterer
af95e96963 app: move GimpControllerManager to its own files 2025-07-12 11:43:28 +02:00