Commit Graph

48807 Commits

Author SHA1 Message Date
Jehan 5b17d08809 themes: improve themes.
- Indent all rules in Light theme with the same number of spaces for
  style consistency.
- When GIMP was set in "Prefer dark variant", spin buttons and other
  entries had too dark borders. Fix this.
- Fix the spinbutton entry's border radius which was at 0, but since the
  buttons of the spin button are themselves rounded, it looks weird only
  on the top and bottom left corners. So apply a 3px radius. I did this
  in the System theme.
2022-08-20 14:04:28 +02:00
Jehan 0cc2dedeb3 gitlab-ci: try to fix the CI for releases (and other CI pipelines). 2022-08-20 11:17:44 +02:00
Alx Sa 0f5431b590 themes: updates to Light theme
Makes the following changes:
*Toolbox Wilber is now visible
*Large black border removed from ScrolledWindow
*"Duplicate text" effect removed from labels
*Toolbox tabs are now stationary when changing selection
*"Add Tabs" menu background color changed to match Light theme
*Unnecessary border around Check Updates box removed
2022-08-20 03:11:53 +00:00
Yuri Chornoivan 82391c8915 Update Ukrainian translation 2022-08-19 20:23:23 +00:00
Yuri Chornoivan 86cbd1a28a Update Ukrainian translation 2022-08-19 20:15:23 +00:00
Alx Sa a3fb3ca110 plug-ins: Enable export of original Duotone data
Optionally includes the previously saved 
Duotone color space data on PSD export.
New load dialogue alerts user if duotone data was imported.
New export dialogue appears if the image is still grayscale and
the parasite exists.
If selected, the mode is set to PSD_DUOTONE in the header and
the original duotone data is written in the color space section.
2022-08-19 19:19:20 +00:00
Jehan 6b3d69a3c5 themes: some fix to the new Light theme.
These are issues which appeared to me only when GIMP was set to use the
dark theme variant. In such a case, I guess we see quite well CSS rules
coming from parent themes, such as the globally set system theme.

* Remove any background image (which may come from the system theme?) on
  buttons.
* The headerbar was dark and when in the background, it had a dark
  linear gradient (probably coming from my system theme). So make sure
  the background color is right as a general rule, and add back a
  (small) light gradient to indicate the background state.
* GtkListBox had a dark background. We don't have a lot of usage for
  this widget yet, but a few (for instance in icon theme settings, or in
  the modifiers editor).
* The GtkSwitch buttons were dark on dark. Set a light background. Also
  when the switch is ON, I add a bit of color, not too strong, but
  enough to indicate the checked status, because I find this widget
  design not so obvious. Since I don't think we use switch buttons
  anywhere else but in Preferences, this is probably not a big problem
  as it should not affect color perception when working on the canvas.
2022-08-19 20:27:57 +02:00
Akkana Peck 947bd1666a themes: add Light theme
It still has some issues, but it's already pretty usable.
2022-08-19 17:40:49 +00:00
Martin af3d417ce1 Update Slovenian translation 2022-08-19 14:58:35 +00:00
Martin 5c5f593919 Update Slovenian translation 2022-08-19 14:49:55 +00:00
Jehan dfb7d2543a Issue #8505: WEBP, be more informative with error.
Add the info about max dimension of WebP with WEBP_MAX_DIMENSION macro.

There is also a test about (picture->width / 4 > INT_MAX / 4), resp.
height, but this should anyway never happen as the C spec says the
smaller range for int is [-32767, 32767], which is an order bigger than
the current WEBP_MAX_DIMENSION (16383).
So we are probably fine assuming all VP8_ENC_ERROR_BAD_DIMENSION errors
will happen because of WEBP_MAX_DIMENSION.
2022-08-19 14:10:15 +02:00
Anders Jonsson 18065236bf Update Swedish translation 2022-08-19 09:54:13 +00:00
Jehan 9b21688501 Issue #6778: Colorpicker (from Colors dockable) shows wrong color.
Actually our X11 implementation is right, and the implementation from
the Freedesktop portal is "as far as it can do", i.e. that we get the
returned RGB value, which is unfortunately in display space. And it
doesn't return any space information together (we don't even know which
display the color comes from, in multi-display setups).

Therefore let's check if we are running GIMP on X11 and if so, let's
call this implementation first.

See this report on xdg-desktop-portal to get proper space info:
https://github.com/flatpak/xdg-desktop-portal/issues/862
2022-08-18 21:42:39 +02:00
Jehan 34ae339099 app: set default simulation intent to relative colorimetric.
We should set these explicitly, otherwise it will usually default to the
first of the enum, which is perceptual (which is usually not a proper
choice).

Relative colorimetric is usually the recommended default.
2022-08-18 19:13:19 +02:00
Jehan 7f1dd80ab2 app: fixing the soft-proof profile chooser.
The GimpColorProfileComboBox widget requires the profile chooser dialog
to be explicitly constructed. It doesn't create it by itself.

I guess I hadn't tested clicking this "Select color profile from disk…"
combo item during review. I only selected visible profiles in the list!
2022-08-18 16:42:39 +02:00
Zurab Kargareteli ef4ed1a10f Update Georgian translation 2022-08-18 08:17:43 +00:00
Zurab Kargareteli 02cfdc8081 Update Georgian translation 2022-08-18 05:48:19 +00:00
Anders Jonsson 6eb158e799 Update POTFILES.in 2022-08-17 19:37:39 +00:00
Luming Zh 4990968dc1 Update Chinese (China) translation 2022-08-17 18:20:10 +00:00
Alx Sa bf53e420af Issue #1973: Add toggle to choose PNG bit depth behavior 2022-08-17 18:05:13 +00:00
Jehan a22575896f NEWS: update. 2022-08-17 18:20:42 +02:00
Alx Sa 7b7ce8c5f0 display: Show Soft-Proofing menu in status bar
This adds a Soft-Proofing pop-over menu when right-clicking the toggle
in GimpStatusBar. It lets users toggle proofing, using BPC and showing
out-of-gamut colors. It also lets users change the profile and
rendering intent.
2022-08-17 11:37:10 -04:00
Jehan d72a42ed20 app: add a modifier action for opacity change.
Opacity and brush size are among the 2 most common tool options which
people might want to often change, though we should likely later add all
other common types of tool settings angle, aspect ratio, spacing, etc.

I am also unsure using the enum action is the right call because what it
does is just taking into account the distance from initial click to
compute an opacity. Instead it might be more interesting to increase or
decrease slowly or rapidly by going right or left from the initial
click. We'll see. But it's a first step.
2022-08-17 16:46:26 +02:00
Jehan 76ddf4421c app, po: remove GimpControllerMouse code.
The mouse controller had many limitations:

* It was not per-device.
* It was a long hard-coded list of events, which made its evolution
  annoying and scrolling the list boring.
* It was starting at button 8, while the first buttons were supposed to
  be hardcoded interactions. And it stopped at button 12, while some
  device might have more buttons nowadays. See !386.
* The "Grab event" does not seem to work in many cases, according to
  feedbacks.

The new GimpModifiersEditor will now handle any button (except the first
button, which is reserved for tools), you can even override or change
default canvas actions (panning, rotation, etc.). It should not be
limited with a max button number either (though I haven't tested with a
device really having a lot of buttons since I don't have any such device
but I did emulate huge button numbers on my stylus with xsetwacom and it
did work well; hopefully I'll get feedbacks). And now it can even run
custom actions.
So basically it should deprecate the mouse controller as the modifiers
editor can do everything the controller could, and more (unless I missed
anything).
2022-08-17 14:20:18 +02:00
Jehan dd012d11d2 app: now support custom actions as input device button + modifiers.
Custom actions are basically any action (currently GtkAction) which can
be assigned a shortcut. Now they can also be assigned to an input device
button (with modifier or not).
2022-08-17 14:20:18 +02:00
Jehan f7d7771038 app: try to make the button selection button more obvious.
From Aryeom's feedback, it's really not obvious enough how we start
customizing button's modifiers.
2022-08-17 14:20:18 +02:00
Jehan 14e8703ff7 app: remove GIMP_MODIFIER_ACTION_BRUSH_SIZE, change defaults and labels.
* The relative brush size change was not implemented anyway. Maybe later.
* Also changing the defaults to GIMP_MODIFIER_ACTION_BRUSH_PIXEL_SIZE
  which I think might be the most understandable size variant.
* Finally re-label "Rotate" to "Rotate View" as per Aryeom's feedback
  because just "Rotate" is indeed confusing as it could mean several
  different actions in GIMP.
2022-08-17 14:20:18 +02:00
Jehan 23dd00b07f app: fix switching seamlessly from constrained to unconstrained canvas…
… rotation and back.
2022-08-17 14:20:18 +02:00
Jehan 156adee410 app: new modifier action to set brush size diameter.
Actually I am renaming GIMP_MODIFIER_ACTION_BRUSH_PIXEL_SIZE into
GIMP_MODIFIER_ACTION_BRUSH_RADIUS_PIXEL_SIZE, which allows to set the
brush size on-canvas, starting from center to border.

The new GIMP_MODIFIER_ACTION_BRUSH_PIXEL_SIZE now sets the brush size
from one border to another.
2022-08-17 14:20:18 +02:00
Jehan 1ab4661bf2 app: fix space actions on canvas.
Space: panning
Ctrl-space: zooming
Shift-space: rotating
Ctrl-shift-space: constrained rotating

Note that these are still hardcoded, unlike the actions through
modifiers + pointer buttons.
2022-08-17 14:20:18 +02:00
Jehan 89f55336a2 app: add a page in Preferences to set the canvas modifiers up.
Finally everything is getting assembled with this commit. It is now
possible to customize the modifiers which will be used on canvas.
2022-08-17 14:20:18 +02:00
Jehan 5167e5aa45 app: new GimpModifiersEditor widget.
This widget will be used to edit the GimpModifiersManager config class
with a graphical interface.
2022-08-17 14:20:18 +02:00
Jehan 100bdeddd9 app: store keys as keyval/modifiers rather than string.
There is really no need to make back and forth between a string and
int/enum representations, and it actually cause problems at times.

It's also a problem for the button representation where a modifier will
be represented as a key.
2022-08-17 14:20:18 +02:00
Jehan 9d3ef444ea app: use modifiers set in GimpModifiersManager rather than hardcoded.
For now GimpModifiersManager returns the same modifiers as what was
previously hardcoded and we have no GUI yet to change the settings. But
the core of the new feature is in place.
2022-08-17 14:20:18 +02:00
Jehan 91b30145cb app: add a GimpModifiersManager object to GimpDisplayConfig.
This object's goal will be to manage customized modifiers per input
device button, which is why I add it to GimpDisplayConfig. It is in its
own new config file (`modifiersrc` in config dir) because it requires
GDK types access (well I could have done without, but it would have been
less semantic, hence not as good of an API). Anyway it is only useful
when running GIMP as GUI.

The GUI widget and the usage code to make this actually useful will come
in upcoming commits.
2022-08-17 14:20:18 +02:00
Jehan 924dea3a35 app, po: show proper instructions in GimpShortcutButton.
When no accelerator was set yet, display relevant information, and when
the button is toggled (waiting for shortcut input), display also
relevant info.
2022-08-17 14:20:18 +02:00
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