Commit Graph

48971 Commits

Author SHA1 Message Date
Jehan 6da9d3aed2 authors: update. 2022-08-21 12:24:20 +02:00
Jehan c4682be682 themes: use the disabled color more globally.
Don't use it only on menus. For instance, there were disabled checkboxes
(and their label) in plug-ins which were not showing different at all,
and it's confusing. Now both menu items, and other type of settings will
show similar "disabled" style.
2022-08-21 12:12:32 +02:00
Jehan fbbe3dbaa9 desktop: update Appdata.
Getting ready for release.
Sorry to translators for adding these strings so late!
2022-08-21 02:56:15 +02:00
Jehan f95a417313 NEWS: update. 2022-08-21 01:26:43 +02:00
Jehan 623346a8a7 app, docs, etc: "Default" is (as the name implies) the new default theme. 2022-08-21 01:03:30 +02:00
Alx Sa cb7f9f86a8 app: Save simulation intent and bpc in XCF file
Creates two new parasites to save the black point compensation status
and rendering intent simulation settings in GimpImage.
The parasites are saved and loaded as part of the image in the 
.xcf file.
2022-08-20 22:31:07 +00:00
Jehan 64113d67bc themes: new Compact theme.
Something which is regularly asked is to use smaller icons. We used to
have a "Small" theme in 2.8, which got away in 2.10 with icon sizing (cf
issue #6121).

This is a revival of such a theme (except I call it "Compact" because it
feels more appropriate than "Small"). The theme is basically the same as
"Default" (through an include), just tweaking some size related CSS
rules.
2022-08-21 00:05:10 +02:00
Jehan 00fbcbea0b app: size the GimpFgBgEditor relatively to the toolbox icon size.
Until now we were sizing the FG/BG area with hardcoded size ((40, 38)
which I'm not sure where it came from!). Now this allocation size will
depend on the toolbox icon size (I made so that the FG/BG area is more
or less the same size as former hardcoded values with large toolbar
icons).
I had to tweak a bit the size of the default FG/BG icons and the swap
icons, which were also hardcoded. They now also depend on the allocation
size, hence the icons size.

Note that this code still has a limitation: it won't resize when you
switch from a theme with one size to another size of icons. A restart
will be necessary. This is something we should improve.
2022-08-20 23:48:44 +02:00
Jehan ebbcf67dd9 theme: transform the Light theme into a Default theme and add a dark…
… variant.

Now with my recent code, instead of creating 2 different themes, I make
it a single theme containing both a Light and Dark variant.

I move all semantic logic into common.css which will be included by both
variants after they set up their color definitions.

For choosing the basic gray to use for the dark variant, I first looked
up what is usually recommended. Most articles on the web about dark
themes would cite some "Material design" project (apparently originated
from Google) which makes guidelines for Android/iOS/Flutter and web
applications. Their guidelines recommend #121212 ("Dark Grey") as
background color. I tried, it's **really** dark. Maybe I'm just not used
to it, but it feels like it might be OK for small phone "apps" which
people might want to watch in the dark, but possibly not for a full
grown desktop software. I don't really know, I might be wrong and some
people might want to edit their pictures with such dark GUI.

Anyway for now, I settled for a base background #303030, which is
already quite dark, darker than Adwaita dark or than our 2.10 dark
variant, but at least doesn't feel like a black hole.
2022-08-20 20:10:57 +02:00
Jehan 05fd811662 themes: parameterize colors of our Light theme.
Instead of hardcoding the colors in CSS rules, make variables of them,
with meaningful semantic names. It will help with making consistent
design where a color means something and is reused in several places
(e.g. a color for "hovering" or "selecting").

I add some variants but not too much (e.g. treeviews had even lighter
background, with an inversion of logic, where selected items are on
darker background instead of lighter).
Colors in this theme are mostly the same before and after this commit,
except for a few parts where I felt that having more variants was
detrimental for consistency and maintenance.

As part of the changed colors:

- check and radio buttons' background just reuse the lighter background
  color (as used e.g. in treeviews and entries).
- menus also use this lighter background color with the color inversion
  (same as treeviews) for hovered items.

This commit also brings some improvements to disabled cases:

- Stylize also disabled tree view items (e.g. disabled actions in action
  search were styled the same way as runnable actions).
- Stylize the same way disabled buttons drawn directly or with an image
  widget.

The last use for this change is that it will help to create a dark
variant for the same theme using nearly the same code, hence get
consistent styling.
2022-08-20 19:23:38 +02:00
Jehan c3dca26d1a app: allow a dark variant of a same theme, instead of having 2 themes.
This way, what will happen is that:

- We can have a single "Default" theme which will have both the light
  and dark versions.
- With our Default theme, when "Use dark theme variant if available" is
  unchecked, we just follow the system-wide dark settings. (though I'm
  unsure we actually do with current code; we do load our theme over the
  system theme, which may be dark, but I don't think we'd load a dark
  theme variant then)
- If the option is checked, we will load the specific dark variant,
  bypassing system settings specifically for GIMP.

Technically for theme designers, all it takes to have a dark variant is
to add a gimp-dark.css next to gimp.css. `gimp-dark.css` is loaded
instead of `gimp.css` when the settings is checked.

Note: there is apparently a new freedesktop portal for setting the
prefered variant (and now it's apparently either light, dark or
default), which is now implemented by GNOME, KDE and Elementary at
least. It would be nice if we could grab this settings and use it if
available. The below link has code sample showing how to do it with
DBus:
https://gitlab.gnome.org/GNOME/Initiatives/-/wikis/Dark-Style-Preference
2022-08-20 19:23:38 +02:00
Anders Jonsson 7b57d1734b Update Swedish translation 2022-08-20 16:03:46 +00:00
Anders Jonsson 93ef3bf1cc Update Swedish translation 2022-08-20 15:55:08 +00:00
MohammadSaleh Kamyab e98645656d Update Persian translation 2022-08-20 14:05:14 +00:00
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