Commit Graph

48771 Commits

Author SHA1 Message Date
Jehan fe65b4d4c6 app: new GimpShortcutButton widget.
A widget to grab a shortcut provided interactively. It can also grab
modifier-only shortcuts so we will be able to use it for the new
on-canvas interaction customizability.

Maybe we'll use this later for the shortcuts dialog which should really
be improved some day and has a lot of known issues. We'll see.
2022-08-17 14:20:18 +02:00
Jehan a853052768 app: new "Canvas Interaction" setting.
Moving the "Space Bar", the "Snapping" and the new "Zoom" (MR !570)
settings there. The idea is that it will also be where we'll customize
more on-canvas related abilities, such as the new zooming behavior
preferences, but also possibility to customizing or disabling the
various canvas action, and finally customizing the new contextual
settings such as brush sizing or other.
2022-08-17 14:20:18 +02:00
Jehan c804865ddd app: new "tools-paint-select-pixel-size-set" action.
Also ensure that the outline circle is redrawn while changing the
outline size.
2022-08-17 14:20:18 +02:00
Jehan 67d5e59ffb app: new "tools-warp-effect-pixel-size-set" pixel size set action. 2022-08-17 14:20:18 +02:00
Jehan ebf99132eb app: create a new pixel-size-set action for Ink and Brush tools.
Once this is done, I got rid of the ugly hack I added over the already
ugly hack used on "*-set" enum actions.
2022-08-17 14:20:18 +02:00
Jehan c7979e7f06 app: new double action "tools-mypaint-brush-pixel-size-set", used as…
… new action_pixel_size of GimpMyBrushTool.

MyPaint brush tool clearly shows the limits of my trick to have some
enum actions work with absolute values whereas others work with
per-mille values between the property min and max.

Indeed firstly MyBrush's "radius" value is logarithmic and can be
negative. Since the enum trick relies on the fact that negative values
are the semantic enumerated constants, it's broken in such case. The
second issue is that while it was acceptable to use int size for most
paint tools (even though they were double), here radius only goes from
-2.0 to 6.0; so using int values only would leave us with jumping brush
sizes.

So now I create a proper double action which simply takes pixel size and
use this from the on-canvas brush size changing. No weird trick, no int
or sign limitations.
I also add a new optional action_pixel_size in GimpToolControl.

Note: I'm also updating a bit the logic for the MyPaint brush outline
function gimp_mybrush_tool_get_outline(). Indeed after skimming a bit
through mypaint-brush.c code in libmypaint, I am not sure at all we need
to use the offset_by_random like this. And really this shown outline
seems more indicative than anything else when I see the actual size
printed by the various brushes. Finally here it was counter-productive
as I needed to get easily the logarithmic radius from the pointer
interaction on canvas.
2022-08-17 14:20:18 +02:00
Jehan 12be7bdc37 app: adding GimpDoubleAction types of actions.
These actions can be activated with a double value. These will be useful
to create new types of size action, which are based on accurate pixel
values instead of an enum hacked to set per-mille values between a
min/max.
2022-08-17 14:20:18 +02:00
Jehan 59709d348c app: distance moved on-canvas set the ink tool size as well. 2022-08-17 14:20:18 +02:00
Jehan 8e9abd5e85 app: make sure the size circle is also displayed for the ink tool.
Note that the other paint tool which is not as common as others is the
MyPaint brush tool. At first I thought the circle outline didn't work.
It does actually work, but the radius concept is simply very weird in
this tool so we have to move a lot. To be investigated.
2022-08-17 14:20:18 +02:00
Jehan 5be997fbdf app: display the brush outline (or fallback or circle) when resizing.
Bypass temporarily the "Show brush outline" settings when resizing
on-canvas.
2022-08-17 14:20:18 +02:00
Jehan b1124770e8 app: stop alt-right click brush size change when releasing Alt first.
Until now, it was only stopiing when releasing right click, but it's
actually more accurate when releasing the Alt key first as the button is
on the mouse/stylus (so releasing it can provoke small hand moves,
especially visible with stylus, I think). Now it stops whatever is
released first.
2022-08-17 14:20:18 +02:00
Jehan 43f0147bfe app: allow to change the brush size on alt-right click.
I started from mitch's patch (though code changed so it was not working,
yet I ended up with quite a different direction).

Modified from original proposition in #498:

* Do not mix opacity and brush size in a same action, one on horizontal
  movement, the other on vertical. The problem is that it's hard to stay
  perfectly horizontal or vertical, so you nearly necessarily change one
  while changing the other and this would be frustrating.
* Do not just use modifiers, but modifiers + right click. The logics is
  that left (or whatever is the first button) click is for the tool
  actions. The middle click for navigation (panning, rotation, and even
  layer navigation now). Right click for now is only for menu. With this
  change, let's use right click for various settings-related changes
  too. Also we already have people complaining with things like canvas
  rotation happening unexpectedly even though it requires button clicks.
  Imagine an action just made of modifiers! Many people would hit these
  by mistake all the time!
* Focus on brush size only for now. Instead of just calling the action
  repetitively with the "SElECT_NEXT" action as proposed in the original
  patch by mitch, let's compute the actual size between the press and
  release. This would allow to have a real visual hint and also would
  make it a lot more useful and meaningful to be an on-canvas change.
  Say you want to reproduce a stroke size on canvas. You can click the
  center and expand to retrieve approximately the size without computing
  it in pixels.

Limitations and future work:

* This is a first draft and I still want to test if it works well with
  the "lock brush to view" and with scale factor > 1.
* I want to associate this with work done for #7034 so that visual hint
  still appear even when we have no visual hint set.
* I am not so fond of with the way we use enum actions which doesn't
  really make satisfying logics (I hacked a bit over it, but it's
  getting ugly). I'm considering creating int/double actions to really
  set some values with exact numbers through actions.
* Right now we need to stop the right click first. I want to be able to
  stop the brush sizing with releasing Alt too.
* It would be nice to make this all more customizable, which is why I
  called internal variable "mod1_setting". The goal will be to have
  other types of actions possibly. Also it could be deactivatable for
  people really not liking these or hitting these by mistake (while not
  needing these). Same for the navigation shorcuts.
* Similarly the right-click menu could be deactivatable or switched to
  other actions conditionally (through Preferences). It is doubtful how
  useful it is (compared to using the same menus on top of the GUI)
  though I don't want to just delete the option because some people
  would clearly be used to it.
* I think we should start breaking down the whole tool events code a bit
  more, in particular the function gimp_display_shell_canvas_tool_events().
* For more settings, a small on-canvas GUI could be of interest where
  you could customize various values through sliders and buttons, and
  also where you could put your favorite brushes or dynamics or whatnot.
  It's not replacing the more complete dockable but could be a nice
  quick version for fast editing.
2022-08-17 14:20:18 +02:00
Anders Jonsson 4520735208 Update Swedish translation 2022-08-17 08:18:18 +00:00
Jehan 402483c61c NEWS: update. 2022-08-16 21:25:26 +02:00
Jehan 31df4c2bf1 Issue #8498: Quirky text to translate in gradients-save-as-css.py.
Just duplicate the blurb into the help string. I'll leave it to someone
else to write a dedicated, longer help text if needed.

Also fixing the call s/Gimp.init/GimpUi.init/.
2022-08-16 21:18:51 +02:00
Yuri Chornoivan c4e67e1b50 Update Ukrainian translation 2022-08-16 18:09:12 +00:00
Hugo Carvalho 8ddd3f4cc9 Update Portuguese translation 2022-08-16 13:41:05 +00:00
Jacob Boerema b0ade14957 build: fix Windows installer
The Hungarian language file for the Windows installer was recently moved
from unofficial to the officially supported languages. However, a new
release including Hungarian by default is not available yet. This causes
our CI to fail because it can't find Hungarian in unofficial.

We change our ci script to download Hungarian from the correct location
for official languages, and adapt gimp3264.iss to reflect the correct
location.
2022-08-15 23:32:47 +00:00
Martin e5113e635a Update Slovenian translation 2022-08-15 22:22:52 +00:00
Martin 6ec57d2542 Update Slovenian translation 2022-08-15 22:22:16 +00:00
Martin f05f1dcdb9 Update Slovenian translation 2022-08-15 22:21:04 +00:00
Nikc 1c81c426ae Modules: Convert CMYK color selector to babl 2022-08-15 21:14:14 +00:00
Zurab Kargareteli 1291c20f24 Update Georgian translation 2022-08-15 20:23:59 +00:00
Zurab Kargareteli 6ffd8d3d66 Update Georgian translation 2022-08-15 20:22:14 +00:00
Jacob Boerema 969b71f78d plug-ins: add support for extra layer mask
According to the specs the extra mask (which they call real user supplied
layer mask) is used "when both a user mask and a vector mask are present".

I haven't seen an example that has the extra mask, so not sure which of
the masks would appear first.

For now assuming that the extra mask will be first. The advantage of
adding this here now, is that we won't try to add a mask channel as a
normal channel.
2022-08-15 14:32:54 -04:00
Rodrigo Lledó 493aeee8f0 Update Spanish translation 2022-08-15 17:53:09 +00:00
Rodrigo Lledó 1bb2e8f8e2 Update Spanish translation 2022-08-15 17:41:53 +00:00
Alx Sa 936954436a widgets: Use simulation intent API in ColorFrame
Uses the simulation rendering intent from GimpImage instead of
from GimpColorConfig. This affects the SamplePoint and Pointer dialogues
as well as the Color Info Window.
2022-08-15 01:26:47 +00:00
Alx Sa 94414c1ca8 core: Add simulation settings to Create New Image
Adds a dropdown for Simulation Profile, Intent, and BPC
to the Create a New Image dialog.
This allows users to assign a soft-proofing profile when the image is
first created. It defaults to "None", however. Users can also set the
default simulation rendering intent and BPC status per image.
These options are also removed from the Preferences dialog.
2022-08-14 17:25:25 +00:00
Alx Sa e28c076622 plug-ins: Use image intent APIs
This updates the JPEG and TIFF CMYK exports to use the image's
simulation rendering intent, rather than always
assuming relative colorimetric
2022-08-14 01:49:56 +00:00
Alx Sa 0587a10543 core: Add simulation intent and BPC to GimpImage
Adds a simulation_bpc and simulation_intent to GimpImage to allow 
plug-ins to access it
for CMYK import/export.
Four pdb functions were added to enable this access:
image_get_simulation_bpc (), image_set_simulation_bpc (), 
image_get_simulation_intent (), and image_set_simulation_intent ().
Next, it updates menu options and code to support GimpImage's
internal simulation intent and bpc.
New 'simulation-intent-changed' and 'simulation-bpc-changed signal 
are emitted via
GimpColorManagedInterface so that relevant tools 
(such as the
CYMK color picker, GimpColorFrame, and future pop-overs)
 are aware of these changes.
2022-08-13 19:39:47 +00:00
lloyd konneker 08686fff8b Create draft devel doc for scriptfu v3 script authors. 2022-08-13 19:07:02 +00:00
Zurab Kargareteli 68029cac89 Update Georgian translation 2022-08-13 18:43:15 +00:00
lloyd konneker 0c1b00b04c Enhance GimpProcedureDialog have int combo widget for G_PARAM_SPEC_ENUM
Resolves #8488
2022-08-13 07:34:17 -04:00
Zurab Kargareteli 062b5290cd Update Georgian translation 2022-08-12 04:36:26 +00:00
Zurab Kargareteli c7d00c9722 Update Georgian translation 2022-08-12 04:33:00 +00:00
Luming Zh dbbcc6bd51 Update Chinese (China) translation 2022-08-10 15:15:57 +00:00
Danial Behzadi abc94e6944 Update Persian translation 2022-08-09 22:06:39 +00:00
Yuri Chornoivan 98eedef51b Update Ukrainian translation 2022-08-09 16:39:44 +00:00
Jehan caebbe4603 INSTALL: fixing copy-paste bugs.
Thanks to Tobias (@Tobias on Gitlab) for noticing.
2022-08-09 11:49:56 +02:00
Hugo Carvalho dd580717f0 Update Portuguese translation 2022-08-08 22:43:14 +00:00
Alx Sa aa51b9e19e plug-ins: Add .ani file import/export 2022-08-08 18:31:45 +00:00
Jehan e7faae1dc3 INSTALL: update the build instructions to target meson.
If we want to encourage meson usage in GIMP 2.99.12 as a test run, our
INSTALL file should target meson commands and options.

Also I took the opportunity fix a bit some parts which were outdated.
2022-08-08 19:19:21 +02:00
Jehan af6218fb53 gitlab-ci: rename autotools/meson tarballs.
If we want to encourage packagers to test the meson tarball (better to
do this now with development releases than later on stable releases!),
we should name it prominently. Therefore I will rename the autotools
tarball as gimp-*-autotools.tar.bz2 whereas the meson tarball will be
named gimp-*.tar.xz.

Also renaming `sources` CI job to `sources-autotools`.
2022-08-08 18:15:33 +02:00
Yuri Chornoivan 70fc715422 Update Ukrainian translation 2022-08-07 15:56:09 +00:00
Hugo Carvalho bec9f380a4 Update Portuguese translation 2022-08-06 22:35:26 +00:00
Jehan 6903909159 NEWS: update. 2022-08-06 19:52:55 +02:00
Povilas Kanapickas 40743c90a2 widgets: Fix out of bounds zoom in gradient editor
When zooming using scroll events it is possible to zoom out of gradient
bounds because the check for out of bounds zoom happens with the zoom
value before the delta is applied. The correct way is to limit the zoom
value after the delta is applied.
2022-08-06 16:28:50 +00:00
Povilas Kanapickas ae3c4c3577 widgets: Implement zoom focus in gradient editor
Zoom focus centers the point that we're zooming into at the location of
the mouse pointer.

Default zoom focus value is 0.5 which results in previous behavior.
2022-08-06 16:28:50 +00:00
Povilas Kanapickas 8d0e6efa10 widgets: Reset view_last_x whevener gradient editor leaves focus 2022-08-06 16:28:50 +00:00