Commit Graph

48003 Commits

Author SHA1 Message Date
Øyvind Kolås ef4e1b86a1 configure, meson, app: depend on GEGL 0.4.36 2022-02-21 23:42:06 +01:00
Matej Urbančič 45d34d31a4 Update Slovenian translation 2022-02-21 19:57:54 +00:00
Lukas Oberhuber b0f0f46b1c gimpcursor: cursor hotspots platform specific
MacOS and Wayland need the hotspot in surface coordinates
  * X11 needs the hotspot in pixel coordinates (not scaled)
  * Windows doesn't handle scaled cursors at all
  * Broadway does not appear to support surface cursors at all,
  let alone scaled surface cursors.
https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/545#note_1388777
2022-02-21 15:18:55 +00:00
Jehan 38d6783299 .gitlab-ci, build: avoid same DLL dependencies from previous runs.
We were already avoiding re-processing a same DLL within the same run
(this can happen when 2 dependencies have themselves a common
dependency). But the dll_link.py script was stateless regarding previous
runs so we might be checking again the same DLLs multiple times (even
though we were not copying them again).

Let's make the script stateful with a new parameter to give a file where
all the previously processed DLL names are stored. I am hoping it would
improve the efficiency of the packaging-win32-native which is suddenly
extra slow (it always times out, even after raising the max job time;
now we time out after 2h30! The 64-bit packaging job just takes 1h,
which is too much already, but still much more reasonable).
2022-02-21 13:36:57 +01:00
Jehan 8370dcc890 NEWS: update.
Forgot to mention the deprecation of webkitGTK based plug-ins. I think
it's a big enough deal to be in this list of changes.
2022-02-20 18:10:56 +01:00
Jehan 8b2ee06f71 app: move appstream to pango markup function to gimp-utils.h.
I'm going to reuse this code in other parts of the file so make it a
utils function.
While doing so, I'm also improving a tiny bit the formatting of lists.
2022-02-20 18:09:58 +01:00
Asier Sarasua Garmendia 2803f3330d Update Basque translation 2022-02-20 12:45:09 +00:00
Anders Jonsson 926d89508b Update Swedish translation 2022-02-20 00:28:55 +00:00
Jordi Mas 753b29a85e Update Catalan translation 2022-02-19 20:24:03 +01:00
Jehan de44059aee build: do not search again dependencies of already done system DLLs. 2022-02-19 19:17:41 +01:00
Hugo Carvalho 3545069dee Update Portuguese translation 2022-02-19 18:13:14 +00:00
Hugo Carvalho fce78bbea6 Update Portuguese translation 2022-02-19 17:56:42 +00:00
Jehan 70ddda8b6d authors.xml: update.
- Adding some people in "documenter" role which is a bit small section,
  despite various people improving things: Jacob (he is now gimp-help
  maintainer!), Niels (for recent documentation of API), Lloyd and
  Akkana (for helping in the devel-docs).
- Fixing "Daniel Novomeský" orthography.
- Adding Lukas Oberhuber (obviously for the recent work on macOS and
  more).
- Adding Patrick David (not sure why he was not even there already!).
  With all the work on gimp-web, tutorials and providing images, I added
  him in "artist documenter" section.
2022-02-19 16:02:48 +01:00
Jehan a9551bbb3c app: update/fix the About's authors.xsl.
I realized the "recent-contributor" template was checking
`last-active >=2 and minor version >= 8`. Because of the second part of
this test, anyone with a last a last-active value of 3.0 was ironically
not included as recent contributors!

Meanwhile, I am bumping the definition of recent as 2.10 and over
(rather than 2.8 and over), for GIMP 3.0 release. Last thing, I am now
sorting by descending last-active (so contributors in GIMP 3.0 are shown
first).
2022-02-19 16:02:14 +01:00
Jehan 201eb46441 NEWS: update.
In particular, make the "API" section a bit less messy by organising in
sublists of changes.
2022-02-19 03:03:01 +01:00
Jehan 657911ce48 plug-ins: using a GimpSpinScale instead of a GimpScaleEntry in…
… various plug-ins.
2022-02-19 02:26:11 +01:00
Jehan 7ca4d0ca45 libgimp: new gimp_procedure_dialog_get_spin_scale() and support of…
… %GIMP_TYPE_SPIN_SCALE in gimp_procedure_dialog_get_widget().

The dedicated function is for when a plug-in wants to use a scale range
multiplied by a factor. Otherwise using the generic function is fine.
2022-02-19 02:26:11 +01:00
Lukas Oberhuber 1baeffc913 macos: Fix 7690 (slow drawing)
Gets drawing in the canvas speed on retina displays up to the speed
of FullHD displays on macOS, making 2.99 usable on macOS.

Generic change:

Changes the cursor_label to delay the drawing phase to the idle
queue, from immediate draw on all platforms.

Before the fix in 32049afd (using a deprecated function in Gtk3)
any draws on this label forced a full canvas redraw. This is due
to a quirk in how GtkLabel functions.

The redraw occurred because GtkLabels resize themselves and everything
around them by sending a resize  message any time they receive new
text. These resizes then trigger the full canvas resize which triggers
a full canvas redraw that cannot be optimized by either Gtk or Big Sur.

MacOS changes:

Only redraws the cursor position label and each of the horizontal and
vertical rules (cursor tracking widgets) 3 times a second max for a
total of 9 redraws a second (ideally out of 60, though I don't believe
under any circumstances that GIMP achieves a 60fps).

Each of the cursor tracking widgets gets its own timeslice, and so
will not redraw when the other cursor tracking widgets are drawing.

This is required because Big Sur is merging all draw rects into
one large rect, dramatically slowing down draws.

This timeslicing ensures that draw rects are maintained at the smallest
possible size. So the typical redraw is a small rect around the
brush. However, 9 times a second, the rect will include one of the
3 cursor tracking widgets (rulers and cursor label).

Additionally, the code tries to minimize resizing the width of the
cursor label by checking if the widget is too small for the text,
then setting the char_width to a greater size so that resizes won't
be that common.

This improves the appearance of the widget as it no longer
constantly jumps about in size on each cursor move.

Here is a discussion of the issue:
https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/572#note_1389445

Reviewer's (Jehan) notes:

* The whole issue about GtkLabel resizing is no more after 32049afd. It 
  is normal for a widget to request a resize when needed. We just don't
  want the statusbar to resize and triggering canvas redraws.
* Changing cursor position text into an idle function generally makes
  sense.
  Also it reverts commit 6de9ea7022 which had a bug I hadn't realized
  when I accepted it: when we test for time, we don't know yet if it
  will be the last position change, hence we could "refuse" the last
  update. Therefore displayed cursor position would end up outdated
  on macOS. This new implementation doesn't have the problem (the last
  idle update always happens after the last move).
* The change about giving 1/3 timeslices to side canvas components 
  (rulers and statusbar) is a complete hack to work around the fact that
  macOs doesn't report properly each damaged rectangle. Instead it
  returns a huge bounding box. The workaround here is to expose these
  area separately.
  We have not been able to find a proper solution yet. This is the only
  reason why I accept this code, for macOS only, to at least have
  something usable there.
  See discussions in MRs gimp!572 and gimp-macos-build!86. With these 2 
  MRs, Lukas reported GIMP 2.99 to perform even better than GIMP 2.10 on
  Monterey, though it could not be tested on Big Sur unfortunately.
* Lastly the set_width_chars() thing is also an ugly hack which I will
  try later to revisit (see !581). I only accepted it (with mandatory 
  macOS-only macro) to have an acceptable state for release after seeing
  a screencast where the label size indeed "jumps around" on macOS.
2022-02-19 01:25:51 +00:00
Jehan 7056f1b960 app, libgimpwidgets: move gimp_prop_spin_scale_new() and…
… gimp_prop_widget_set_factor() to libgimpwidgets.

Now that GimpSpinScale is in libgimpwidgets, it's time to move the
associated prop too, to make it a prop widget with such a widget easily
creatable by plug-ins.

While doing so, I update both these functions logic, binding properties
together with the g_object_bind_property*() APIs (as we do already in
some other recent prop functions) rather than connecting to signals
ourselves. It makes for much simpler code.
2022-02-19 00:14:44 +01:00
Anders Jonsson aa5a61ed5b Update Swedish translation 2022-02-18 20:27:27 +00:00
Jehan 6d117b257f build: fixing Exiv2 source URL in flatpak manifest.
The source apparently got changed to using the forge's download section.
The checksum stayed the same (as checked by myself).
2022-02-18 16:35:02 +01:00
Jehan cf84f0e707 libgimp: fix more gi-docgen "qualifier fragment".
Now the warning is:

WARNING: Invalid fragment for 'Gimp.Config': it should be struct
It implements the [iface@Config] interface and therefore has all its
                  ^~~~~~~~~~~~~~

This warning feels wrong as we use GimpConfig for the name of the
interface, yet in the .gir file, I see `<record name="Config" …>` yet
`<interface name="ConfigInterface" …>`.
I suppose gi-docgen would want us to use [iface@ConfigInterface] if we
want to link the interface. But looking at the gir file, all interesting
interface methods are associated to the Config record. So let's just go
with the [struct@Config] proposed by the warning.
In any case, something feels wrong or broken here, but we need to fix
this for the CI. I hope Niels can look at it at some point.
2022-02-18 14:03:47 +01:00
Jehan 29f23c8f98 libgimp, libgimpconfig: fixing gi-docgen "qualifier fragments".
Fixing these 2 warnings in the CI which end up fatal:

WARNING: Invalid fragment for 'Gimp.Parasite': it should be struct
Serializes the object properties of @config to a [class@Parasite].
                                                 ^~~~~~~~~~~~~~~~
WARNING: Invalid fragment for 'GLib.MainLoop': it should be struct
it has a GUI and is hanging around in a [class@GLib.MainLoop], it must call
                                        ^~~~~~~~~~~~~~~~~~~~~
2022-02-18 12:11:01 +01:00
Jehan 6b76e3cd8d libgimpwidgets: updating .def file.
I still manage to forget this file, nearly every time!
2022-02-18 12:04:37 +01:00
Ngọc Quân Trần 3126e493b4 Update Vietnamese translation 2022-02-18 07:28:43 +00:00
Yuri Chornoivan cf55f3f4d7 Update Ukrainian translation 2022-02-18 07:05:14 +00:00
Yuri Chornoivan 8f200ba00e Update Ukrainian translation 2022-02-18 07:02:15 +00:00
Jehan 9ce93ece00 desktop: add some AppStream release items.
These are visible enough changes (in the GUI) that they deserve to be
mentioned here.
2022-02-18 01:11:58 +01:00
Jehan fd6bf8427e NEWS: update. 2022-02-18 01:06:26 +01:00
Anders Jonsson f6a68b436e Update Swedish translation 2022-02-17 23:29:00 +00:00
Anders Jonsson 3f5fbe21bf Update Swedish translation 2022-02-17 23:14:43 +00:00
Jehan b889de3ff6 app: remove early macOS optimizations which are now counter-productive.
Basically disabling commit 4f9b7373e6.
After some new patches for GTK3 I wrote, and removing the settings on
NSViewUsesAutomaticLayerBackingStores, Lukas reported that it works like
never before, faster than 2.10 even. Note that this could only be tested
on Monterey, nobody tested on Big Sur with this specific combination
yet.

In any case, we decided to remove this settings and add the new GTK3
patches.
See: https://gitlab.gnome.org/Infrastructure/gimp-macos-build/-/merge_requests/86#note_1384727
2022-02-17 23:42:57 +01:00
Jehan 97b81118aa libgimpwidgets: add a "mnemonic-widget-changed" signal to GimpLabeled.
This allows to track changes of mnemonic widgets, as we do in
GimpLabelColor when we switch from editable to non-editable (or
reverse).
2022-02-17 23:24:05 +01:00
Jehan 65077a605f plug-ins: update foggigy after changes in GimpProcedureDialog.
The default for color properties (GimpRGB) is now to be editable. So
let's remove the formerly specific call for this.

Also fixing a clashing mnemonics ('c' both for '_Color' and '_Cancel').
2022-02-17 23:13:43 +01:00
Jehan 0f36ce596a libgimp: improves the support of GimpParamRGB properties.
Now using the new GimpLabelColor as new default for RGB properties. It
makes more sense that the default is editable widgets. Also it has a
label, which is better default widget.

Also gimp_procedure_dialog_get_color_widget() now only returns
GimpLabelColor widgets.
2022-02-17 23:13:43 +01:00
Jehan 4fecdd57d8 libgimpwidgets: allow editable GimpLabelColor.
I was initially considering a second widget, but it makes actually much
more sense to make the editability a property of the GimpLabelColor. It
also mean it can be switched on or off depending on situations.
2022-02-17 23:13:42 +01:00
Jehan 1c03df05c5 libgimpwidgets: new gimp_prop_label_color_new(). 2022-02-17 23:13:42 +01:00
Jehan d7fb0842a1 libgimpwidgets: new GimpLabelColor widget (color area with a label).
I tried to have a not too overwhelming API, so we just ask for the label
and initial color at construction. We keep sane defaults for the rest
and let people tweak the result by getting the color area widgets
themselves (if they need to force-showing flat colors or change the drag
buttons in particular).

Another thing I wondered about was the initial size of the color area.
Without a size request or being in some container expanding its
children (which may also be ugly), it ends up too small. I can imagine
such widget being used especially when you want to display several
color rectangles next to each other with a label each. So I just set it
this way. Anyone is free to request a resize after constructing the
object.

Last but not least, the position of the label was especially of interest
here. For my idea of a list of colors, I could definitely imagine color
blocks aligned with vertically-oriented labels above or below. It might
be worth adding an API for this later on.
2022-02-17 23:13:42 +01:00
Jehan f50976d81b libgimpwidgets: new gimp_color_area_enable_drag() API.
This would allow to enable, configure or disable drag ability of a
GimpColorArea ater its creation.

I tested that it works correctly in binding. For instance in Python:

> area.enable_drag(0)
> area.enable_drag(Gdk.ModifierType.BUTTON1_MASK |
>                  Gdk.ModifierType.BUTTON2_MASK)

… correctly disable then reanable the drag with buttons 1 and 2 (in
particular, I wanted to verify there was any reason why the property was
G_PARAM_CONSTRUCT_ONLY. Turns out there was no good reason).

I was interested by such API because having long list of parameters in
various APIs is very annoying. It is much nicer to have simple
constructors with decent defaults and proper API to modify a widget
afterwards in order to cater to special needs.
2022-02-17 23:13:42 +01:00
Jehan 81692874fc Issue #7301: default GimpProcedureDialog widget for string property…
… has no label.

Now fixed with the new GimpLabelEntry created in the previous commit.
2022-02-17 23:13:42 +01:00
Jehan 9357552059 libgimpwidgets: new GimpLabelEntry widget and associated prop API…
… gimp_prop_label_entry_new().
2022-02-17 23:13:42 +01:00
Jehan 6b5037f039 libgimpwidgets, themes: more compact GimpSpinScale.
There were some complaint about the height of these scale.
The min-height was clearly too high. I also made the buttons a bit more
compact by removing a bit of padding.

Finally I add a CSS name to the class, in order to avoid using the
parent class name ("spinbutton"). This makes for clearer and more
customizable themes (ability to style the GimpSpinScale without styling
GtkSpinButton too).
2022-02-17 23:13:42 +01:00
Jehan c93742f178 libgimpwidgets: improving (kinda) GimpSpinScale in RTL layout.
The label was simply completely invisible because of broken progress
computation. Now it is visible at least when the progress fully cover
the label, but a part of the label is not drawn when the progression is
smaller than the label. I still have not figured out how to fix this,
though I am starting to wonder if we should not just drop this 2-color
fancy drawing of the label. Clearly the fact we can't get the exact
progression gadget dimension is biting us.

Another issue I noticed when playing with RTL layout is that when
editing the value, it gets printed on the right side (together with the
label) which gets messy. This is also something to figure out, hoping we
get an API for this on the GTK side.

Also I am setting "auto dir" to FALSE on the Pango layout, making sure
it follows the widget direction, whatsoever. In particular, even if the
contents is not RTL characters, we should keep a RTL layout to avoid
completely broken layout.
2022-02-17 23:13:42 +01:00
Jehan dfd05c0717 libgimpwidgets: improve a bit the position of progress and normal text.
The logics to get the progress position is not proper because the text
area (as returned by gtk_entry_get_text_area()) is actually slightly
smaller than the progress area. Unfortunately it doesn't look like there
is an API to get the exact progress area. This commit improves a bit the
situation by starting the progress rectangle when excluding the
intersection of 2 rectangles in pango at the start of the text area (not
at 0).

It's still not perfect as the progress width will be anyway a bit too
small and we don't have the data to compute it properly, but it's better
than it used to be. I also set several variables to double instead of
int to be more accurate, though this part doesn't help much.

Finally I used the ink extents rather than the logical extents. Since we
are here to draw, this is the ink extents which is really needed.

Note: for the bug to be visible, you need to have a different text color
for the progress and non-progress part of the scale.

Also I'm unsure about the right-to-left logics which seems very broken.
2022-02-17 23:13:42 +01:00
Jehan ab1fc79a07 app, libgimpwidgets: move GimpSpinScale to libgimpwidgets.
There is really nothing specific to the core application, it is quite a
generic widget, so it would be nice for plug-ins to be able to use this
widget.
2022-02-17 23:13:42 +01:00
dimspingos 17528d787e Updated Greek translation 2022-02-17 10:58:37 +02:00
Bruce Cowan 19ac1f3c4f Update British English translation 2022-02-16 16:52:57 +00:00
Bruce Cowan 4adb49383b Update British English translation 2022-02-16 16:51:39 +00:00
Bruce Cowan 6d11b36a7e Update British English translation 2022-02-16 16:34:55 +00:00
Yuri Chornoivan 5e50603d3c Update Ukrainian translation 2022-02-16 07:44:43 +00:00