Commit Graph

48933 Commits

Author SHA1 Message Date
Gotam Gorabh 091ce7cdf2 libgimp: Add scrollbar to dialog comments
Resolves #8550
Puts comments widget in GtkScrolledWindow widget to prevent
dialogue growing too tall with multi-line comments.
2022-09-30 18:54:07 +00:00
Yuri Chornoivan aec5c3c108 Update Ukrainian translation 2022-09-30 17:20:50 +00:00
Martin 471f9e641b Update Slovenian translation 2022-09-30 16:18:54 +00:00
Jehan 690949eb34 app, libgimp, pdb: add a note about unsupported markup.
After re-reading #534, I realized I missed the discussion about unsupported
markup by the tool. Then I tested and confirmed what Ian Munsie initially said
in a comment: unsupported markups are properly rendered in the text layer, yet
are simply dropped when editing with the text tool.

This is actually the ideal behavior as it means that with the API, you can even
go further than what is currently possible with the GUI. So it gives nice powers
to people who can script GIMP. We still need some warning in the function
documentation to tell developers about this weakness in the tool GUI.
2022-09-30 00:59:10 +02:00
Jehan 9aa32ffe42 themes: fix textview background color.
It seems I had forgotten some hardcoded color in there. I didn't notice it until
now, because it was not that bad in the few instances where it was shown (for
instance the comment field in export plug-ins), but I really realized there was
a problem with the Python console which was not too practical (white writing on
kinda light background).
2022-09-30 00:51:33 +02:00
Ian Munsie 445909bff5 Issue #534: add a function to set the Pango markup of a text layer
This complements the existing text_layer_get_markup function and allows
scripts to create and modify complex text layers.

It adds the <markup> root tag if it was not supplied and will run the
markup through pango_parse_markup() to check for errors.

Reviewer's (Jehan) note: this is a mostly untouched patch contributed in #534,
except that code moved around. I also fixed the header set in the .pdb, a link
to pango markup docs and added the meson changes.
2022-09-30 00:50:34 +02:00
Jehan 8dcc9345fa libgimp: fix GObject-Introspection build in autotools.
Fixes:

> /usr/bin/ld: ../libgimp/.libs/libgimpui-3.0.so: undefined reference to `gimp_check_custom_color2'

I am actually unsure this fix is fine. It doesn't look like it should
work. And worse, I can't reproduce the fix by reverting it after.

The only other person who reported it was akk, with exactly the same
symptoms.
2022-09-29 23:11:38 +02:00
Jehan c342bcf1d9 NEWS: update. 2022-09-29 22:47:18 +02:00
Jehan 4e08ab9659 themes: add some border theming to default and active buttons.
I noticed some buttons had a bluish border, showing the system theme leaking
over our default theme. So I'm just overriding this with a grayscale color.

These 2 new rules are especially useful in dialogs so that you know what happens
when you hit "Enter". The "default" action (.suggested-action in GTK CSS) is the
action we set to be the active one by default. E.g. if you open a dialog and hit
Enter immediately, without touching any widget focus, this is what will be
activated.

The GTK CSS .default action on the other hand seems to simply be the button with
focus right now, which can be changed through Tab or other ways. If both types
of styles are visible, the .default one is the actually activated action (not
.suggested-action), which is why I make its style a bit stronger (solid rather
than dotted and a bit more opaque).

Also I discover the shade() function to reuse a color and adding it
transparency!
2022-09-29 21:06:47 +02:00
Jehan 5c53fe7b49 themes: no different background for checked check/radio buttons.
Checked buttons had a background using the @selected-color. This was because of
a too broad rule on `.text-button:checked`. Basically it looks like the broad
rules are not good because they sometimes override more accurate rules for
specific widgets.

I also make a few more rules a bit more accurate. Also I extend some CSS rules
for check and radio buttons.
2022-09-29 19:59:55 +02:00
Alx Sa 4ddb71c8ac plug-ins: Export PSD as CMYK file
Adds an option to export as CMYK (mutually exclusive with the existing
Duotone export option). Header information (mode and number of channels)
are set, and the data itself is converted via Babl.
Layer channels are also hardcoded to 4, since GIMP currently doesn't
support CMYK channels.
2022-09-29 17:27:03 +00:00
Jehan 91ec8a34f3 themes: have the "extreme" CSS colors a bit less extreme.
We had some concept of slightly more extreme theme colors (i.e. darker in dark
themes) to color differently in some widget-in-widget cases.

For instance, we use this in the treeview list to separate it better from nearby
interface. But this extreme dark background may have been a bit "too dark", as
reported by Jacob. The goal is for this list to stand out, but maybe it was
standing out too much. Hopefully it's better now.

As a side change, I also add some borders to the top icon header (with "eye" and
"lock" icons) just above the list. I think it better explain the separation.
2022-09-29 19:01:00 +02:00
Daniel Novomeský 403d11330c flatpak: minor fixes in libde265 and libjxl modules
don't build unnecessary tools from libde265
libjxl uses existing BROTLI library instead of bundled one
2022-09-29 11:51:47 +00:00
Jehan 4ab1102ae2 themes: switch should have a border otherwise it's hard to understand. 2022-09-29 00:04:12 +02:00
Jehan 7c96fc723c Issue #8670: the color of the "selected text" field seems too dark.
Just use an inverted logic for the selected text (i.e. white on black in light
mode, or black on white in dark mode). This is the usual logic for rendering
selected text anyway (except that we don't use non-grayscale colors, e.g. blue
background is common in system themes).
2022-09-28 23:27:50 +02:00
Jehan a021b1999a libgimp: change signature of get_window() of GimpProgressVtable.
As diagnosed in #8649, using a guint32 for windows identifier may have been
right long ago (was it?), but is definitely not anymore. I can see that a XID is
an unsigned long nowadays (usually 64-bit on 64-bit Linux).

As far as I can see, on Windows, it would be a void* behind (which also
corresponds to the error message in #8649 description):

> typedef void *PVOID;
> typedef PVOID HANDLE;
> typedef HANDLE HWND;

Cf. https://learn.microsoft.com/en-us/windows/win32/winprog/windows-data-types

I *think* that pointers would be 64-bit on Windows 64-bit, though I'm unsure
(after all, this is an OS with 32-bit long int on 64-bit arch!).

Anyway, it's just better to move to 64-bit window identifiers.
2022-09-28 22:41:05 +02:00
Jehan a93249fa65 Issue #8649: fix "incompatible pointer to integer conversion".
Since Clang 15.0.0:

> The -Wint-conversion warning diagnostic for implicit int <-> pointer
> conversions now defaults to an error in all C language modes. It may be
> downgraded to a warning with -Wno-error=int-conversion, or disabled entirely
> with -Wno-int-conversion.
2022-09-28 22:34:05 +02:00
Jehan d3458a82d0 Issue #7023: icon size selection on GIMP 2.99.
This kinda reverts commit 6aebd30de1 ("app: remove
icon sizing preferences"), except that the code base is different enough since
this old commit was mainly for GIMP 2.10.x.
In any case, after initially thinking that GTK+3 handling for high density
display would be enough, we finally decide that adding back a Preferences-wide
setting for overriding the theme-set icon size is a good idea (additionally to
GTK+3 automatic support).

The base idea for removing the feature was that GTK+3 has high density display
support, through the "scale factor". Typically a high density display will
normally be set as using a ×2 scale factor so all icons will be double size.
Unfortunately it turns out it's not enough.

For instance, on very small screen estate, even with a scale factor of 1, if the
theme sets 24px toolbox icons, it may still take too much space.
Oppositely on huge screens, even with ×2 factor scale detected by the OS, the
icons may still feel too small (this is possibly what happens with #7023).

Furthermore there is also a matter of taste. Some people like small icons even
when they have the space. Others may want bigger icons, easy to click on.

Finally you can like a theme for its color scheme for instance, but it may not
have the icon size you want. Right now, we'd need to duplicate every theme in
small or bigger size. Instead of doing so, let's just have this global setting
overriding the theme rules.

Comparison with the 2.10 implementation:

- We still provide 4 sizes: small, medium, large and huge.
- We don't have the "Guess ideal size" setting anymore. Instead this is now a
  mix of the GTK+3 scale factor logic and the theme-set or custom size. I.e.
  that on a high density display with ×2 scale factor, we could have toolbox
  icons up to 96 pixels (48×2)!
- We now try to have less custom code in widgets as we append the CSS rules to
  the theme (similar to what we were already doing for dark theme or icon
  variants). What happens in widget code is mostly to connect to changes in
  themes and redraw the widgets which need to be.
- The custom size will now affect: toolbox icons, the FG/BG editor widget (in
  both the toolbox and the color dockable), dockable tab icons, the main
  dockable buttons, eye and lock header icons in item tree views, eye and lock
  cell icons in the item lists.

There are still a bunch of areas where it is not taken into account, such as
plug-ins, and various dialogs, but even in custom-made interface in dockables.
Ultimately it might be interesting to have a way to sync more buttons and
widgets to a global size settings.

Lastly, I fixed a bunch of existing bugs where we were updating icon sizes with
gtk_image_set_from_icon_name() using the const icon name taken from
gtk_image_get_icon_name(). As this was reusing the same string pointer, we were
ending with freeing the icon name.
2022-09-28 21:11:58 +02:00
Jehan b48bd7d337 themes: do not set a background-color on all .horizontal class widgets.
This was massively breaking GtkScale rendering. Or at least the marks (and mark
texts) added by gtk_scale_add_mark() were simply invisible.
I tried to figure why, staring at the GTK inspector and testing various CSS
rules to fix it without removing this line, but just couldn't make sense of it.
In the end, I'll just remove this line. It looks like in CSS (or just GTK CSS?),
it might be better to set rules on accurate widgets rather than too broad rules. 🤷
2022-09-28 20:49:54 +02:00
Tim Sabsch 1dda74a849 Update German translation 2022-09-27 16:16:31 +00:00
Jehan 624493af4b app: properly resize the GimpFgBgEditor when changing icon size.
This is the needed improvements I was talking about in commit 00fbcbea0b. Right
now, when changing the icon size, the FG/BG color widget was not immediately
resizing. It needed a restart of GIMP.

Now it will properly react to "style-updated" signal, but also to "theme"
property of GimpGuiConfig.
The reset of the color icon pixbufs is also needed when GimpFgBgEditor size is
re-allocated.
2022-09-26 21:53:13 +02:00
Jehan dfbaf4d501 app: make sure the icon size and button relief are updated when changing theme.
When changing the theme, the style-updated signal is *usually* run, but not
always. For instance, moving from a theme with big icons to one with smaller
icons (or the other way around) sometimes work, and sometimes doesn't. I'm not
sure if it's to be considered a bug in GTK or if this signal depends on other
things. Anyway we have our own "theme" signal on the GimpGuiConfig and we know
exactly that we need to make sure that the icons are properly redrawn in such a
case. So let's just connect to this signal.
2022-09-26 21:10:30 +02:00
Jehan d2cf2813dd themes: new "Middle Gray" theme.
So what we read on the topic is to use (as base color) the gray which is
perceptually half-way between black and white. Unfortunately it can mean
different colors. For instance if using the sRGB TRC, the #808080 color is
sometimes cited.

Instead I went with the color LCH (50, 0, 0), i.e. with half perceptual
lightness in "CIE LCH(ab) float" babl space, i.e. #777777 in sRGB. It
corresponds to the 18.42% gray which is often refered to, so it seemed a fine
choice.

This replaces proposal in !683 because the contributor is not responding
anymore, and also it uses the common theme base CSS files used by all other
official themes.
2022-09-26 18:37:16 +02:00
Daniel Novomeský 0f8f3c3f1a flatpak: enable BMFF format support in exiv2
Improves AVIF, HEIF, JPEG XL metadata support.
2022-09-23 13:30:12 +02:00
Daniel Novomeský e0ef799473 flatpak: upgrade libheif and libjxl 2022-09-22 16:32:33 +02:00
Balázs Úr a50a4ddd1b Update Hungarian translation 2022-09-20 22:07:08 +00:00
Balázs Meskó 524317753a Update Hungarian translation 2022-09-19 23:04:03 +00:00
Balázs Úr 4bb592fd71 Update Hungarian translation 2022-09-19 22:52:19 +00:00
Daniel Novomeský 213aa77fc9 plug-ins: RGB AVIF compatibility with Safari on iOS 16.0
Write both ICC and NCLX boxes for RGB AVIF to make sure that
all browsers render the AVIF images in same manner.
Use heif_init/heif_deinit in libheif 1.13.0+
2022-09-19 14:01:11 +02:00
Martin bb0e243374 Update Slovenian translation 2022-09-18 09:39:31 +00:00
Sveinn í Felli dbe81ac91c Update Icelandic translation 2022-09-16 21:48:54 +00:00
Sveinn í Felli 6b10d6e8c1 Update Icelandic translation 2022-09-15 22:45:59 +00:00
Fran Dieguez 27bbc8a5df Update Galician translation 2022-09-15 06:26:32 +00:00
Zurab Kargareteli 42330e30af Update Georgian translation 2022-09-14 15:45:00 +00:00
Boyuan Yang e94411661e Update Chinese (China) translation 2022-09-13 18:13:04 +00:00
Anders Jonsson 250d82cc7c Update Swedish translation 2022-09-13 17:17:59 +00:00
Anders Jonsson 46e75e952c Update Swedish translation 2022-09-13 17:04:14 +00:00
Boyuan Yang 7c9a1f5021 Update Chinese (China) translation 2022-09-11 19:30:56 +00:00
Hugo Carvalho 1c5c1d90b8 Update Portuguese translation 2022-09-11 13:46:58 +00:00
Yuri Chornoivan 2f6ca56301 Update Ukrainian translation 2022-09-11 06:11:09 +00:00
Jehan 2c3e65a6b6 NEWS: update. 2022-09-10 23:45:08 +02:00
Thomas Klausner 22dee60a9d Issue #8605: Unportable test(1) operator in tools/extract-vector-icon.sh 2022-09-10 23:08:06 +02:00
Jehan 2be2c43c9c plug-ins: new "root-layers-only" argument to file-pdf-save.
Something I wanted to implement for a long time and today I finally took
the time after I had one more annoying case where I had to merge all
groups for exporting then undo for saving!

Now this won't be needed anymore as the plug-in will allow to export
only as pages any first-level layers (groups included, so you could
gather your page compositions in root layer groups). For me, it's the
only way I use this when making/editing PDFs with GIMP, but maybe some
people would still want GIMP to crawl into groups and subgroups and
export layers individually. That's why I make it an option, defaulting
at TRUE.
2022-09-10 22:56:01 +02:00
Jehan e3ce70c5e8 plug-ins: port "file-pdf-save" to GimpProcedureDialog.
Note that I didn't port "file-pdf-save-multi" at this point, though I
did move to using GimpProcedureConfig instead of GimpValueArray
everywhere.

In any case, that's a lot of code removal and simplification already,
though some part of this plug-in is still a bit ugly.

We also get proper config storing between sessions now.

As for metadata, it unfortunately doesn't look like Exiv2 has PDF
support, so I didn't add metadata settings.
2022-09-10 22:23:03 +02:00
Jehan b24d4c93e2 libgimp: deactivate metadata flags without appropriate property in…
… gimp_procedure_config_save_metadata().

If you use gimp_procedure_config_save_metadata() or
gimp_procedure_config_end_export(), you don't really control the flags
and let the GimpProcedure API make somes choices for you, based on
various assumptions. One of them is that the procedure has specific
properties (named "save-*", either created manually or with the various
gimp_save_procedure_set_support_*() functions). So if you don't have
them, we should assume this format doesn't handle a given metadata
format and deactivate it.

For plug-ins with a different/specific logic, they are expected not to
use these helper functions. They would likely call lower level functions
such as gimp_image_metadata_save_finish() or the newer
gimp_image_metadata_save_filter(), where you control the metadata flags.
2022-09-10 21:35:00 +02:00
Jehan 646bc3e43b Issue #8604: NetBSD does not provide libdl.
The dl*() functions are in libc directly. This probably applies to all
*BSD too. And from what I read, it should even apply to macOS, even
though a libdl is present there (is it bogus?).

So let's make the libdl check proper by only make it mandatory on Linux
(on Windows it was already unchecked too).
2022-09-10 17:42:28 +02:00
Jehan a78651aca4 Issue #8604: Linux Input is enabled even though it is not Linux.
Fix the Linux Input test to correctly only depend on whether or not the
header is present. Having X11 target is not enough (e.g. it breaks the
build for NetBSD and probably on all BSDs).
2022-09-10 14:50:38 +02:00
Jehan 76bc349279 devel-docs: starting to move development documents to dev website.
This file was just moved as content/core/specifications/locks.md in the
pat/bootstrap branch of the gimp-web-devel repository.
This branch will soon be merged and become our new website. Removing the
now duplicate in our source repo.
2022-09-09 21:12:25 +02:00
Jehan cfeedb8736 data, devel-docs, gitlab-ci: improve the docs tarball.
- Use a relative path for GIMP_LOGO_PATH inside the gi-docgen generated
  HTML, and not an absolute path taken from build dir (otherwise this
  would break, for installed docs, but also for the tarball and the
  developer website!).
- Also use either gimp-logo.png or gimp-devel-logo.png depending on
  whether we are on a stable or unstable branch.
- Install these in images/ inside the GIMP docs folder, which
  corresponds to the relative path given to GIMP_LOGO_PATH.
- The installed root dir will be $datadir/doc/gimp-2.99/, e.g.
  /usr/share/doc/gimp-2.99/
- Inside this folder, the library references will be in libgimp-3.0/ and
  libgimpui-3.0/ (instead of weird Gimp-3.0/ and GimpUi-3.0/). Note that
  the root dir uses the application version (2.99) whereas the library
  folder use the API versions. These are different in development phase.
- Archive the gi-docgen installed files, not taken from the build dir,
  to avoid packaging temp files, such as the .toml files. Note that
  `g-ir-docs` files are still taken from the build dir, as we don't
  install them yet.
- Finally package all this in a directory before archiving in a tar.xz,
  named the same as the directory (e.g. gimp-api-docs-2.99.13/ inside
  gimp-api-docs-2.99.13.tar.xz).
2022-09-09 20:32:27 +02:00
Jehan faff5d00b5 gitlab-ci: generate tarball for GIMP documentation. 2022-09-09 16:54:28 +02:00