Commit Graph

437 Commits

Author SHA1 Message Date
Jehan c95b8518fe app, icons: use the Python executable found by pythonmod.find_installation().
We already search for a compatible Python version in the root meson file, no
need to look up Python 3 again in the PATH, each time we run an external Python
script in the build.

This should hopefully fix #9687.
2023-07-04 19:00:55 +02:00
Michael Natterer 26dce72d2c Remove autotools 2023-05-27 00:03:52 +02:00
Alx Sa b2874464f5 icons: Revert most of !909
Per @Jehan, this solution would prevent default icons from being loaded
in custom themes if they did not include their own version.
The only thing kept from !909 is the replacement of hardcoded strings
in a few files with constants defined in gimpicons.h.
2023-05-14 21:54:41 -04:00
Alx Sa bca4535c40 icons: Restore GIMP icons replaced by GTK defaults
Five icons in the Layer dockable were being replaced by GTK defaults at
runtime. A "gimp-" prefix was added so that GIMP's version would always
be used. A few dialogues were fixed to use constants rather than
hardcoding the filename, to make it easier to update the icon in the
future.
2023-04-30 13:58:39 +00:00
Jehan e48b002c84 app, icons, libgimpwidgets: add "distribute with evenly gaps" options.
There was one case in Inkscape which we could not do: distributing objects
keeping even gaps between them. Until now, we could only distribute keeping even
distance between anchor points (top, left, bottom, right or center).

With these 2 additional distribute options, I believe that GIMP is able to do
all the Alignment and Distribution options available in Inkscape (not the
"Rearrange" or node features, neither the text align/distrib; I just mean the
common align/distribute on objects), and even a bit more thanks to the anchor
point system (e.g. in Inkscape, we can't left or right-align to a reference
object/image center, or we can't center to a reference left/right/bottom/top
border; but we can do it in GIMP).

The icons are hopefully temporary, until we can make better ones.
2022-11-08 23:48:32 +01:00
Anders Jonsson e601a6c7de Change GTK+ to GTK
GTK got rid of the + in 2019:
https://lwn.net/Articles/779305/
2022-07-07 14:02:36 +00:00
Stanislav Grinkov e19111c160
themes: Issue #2000. Make Color theme H/V chain icons...
... visually distinguishable.

Reused (with a bit of modification) Symbolic theme svg hchain/vchain
icons.
2022-03-21 23:17:35 +06:00
Jehan 4ba8aa2322 icons: fix the native Windows build in CI with autotools.
Fixes:

> make[3]: *** No rule to make target '64/dialog-question.png', needed
> by 'gimp-core-pixbufs.gresource.xml'.  Stop.

It looks like a bug in autotools on Windows because there is no reason
why it would fail. The missing PNG should be caught by the '64/%.png'
rule. Anyway after testing, it fixes the gimp-win(32|64)-native CI jobs.
2022-02-14 23:22:39 +01:00
Jehan 5e7bcc291b icons: add COPYING files for icon themes.
Our Symbolic icon theme comes from the art-libre theme now archived by
the GNOME design team. It had various authors, including originally
Jakub Steiner and Barbara Muraus, then jEsuSdA, Klaus Staedtler,
Alexandre Prokoudine and Aryeom Han. Various other people tweaked the
icons and may have contributed. See the git log for details.

The Color icon theme is more of an original work by Klaus Staedtler, as
I understand it, with some additional icons by Alexandre Prokoudine,
Aryeom Han and other contributors. See the git log for details.

This makes licensing clearer for these specific subsets of the project.
2022-02-09 16:31:22 +01:00
Jehan 59cd3afe50 icons: now unused meson.build files. 2022-02-01 17:39:28 +01:00
Jehan 3b6b17d30e icons: oups, forgot to commit the locks.list. 2022-02-01 15:43:49 +01:00
Jehan 63a17608ef icons, tools: review visible, linked and lock icons.
They all seem to only be needed in 16x16. As a consequence, the 20x20
category disappears.
2022-02-01 15:31:49 +01:00
Jehan 407f54f33e icons: more factorization of icon installation/build code.
Though the Color and Symbolic icon themes will have a different build
process and naming scheme for their icons, the base list is meant to be
the same by maintenance principle. So I am moving out the lists to the
icons/ directory's meson file.

Bumping meson requirement to 0.53.0 because I need to ability to use a
variable as dictionary key (not only string literals), which appeared in
this version. Meson 0.53.0 was released 2020-01-07 and seem to be used
in any stable distribution released since 2020. In any case, it seems
widespread enough to bump it now for our dev branch.
2022-02-01 13:07:25 +01:00
Jehan ae6c58652e icons, tools: fix the CI when building icon resources with vector icons.
Ok that was a bit of a mess with the 4 build cases (combinations of
meson, autotools, vector and raster icons). I *think* this is now OK.

Basically we still need to build the colorsvg2png tool even when
installing vector icons, just for the purpose of the 2 icons
dialog-question and gimp-wilber-eek which we compile into GLib resources
from PNG images.

Also it looks like I completely forgot to add the subdir meson.build in
icons/Color/.
2022-01-31 22:33:30 +01:00
Jehan 92a919aee1 icons, tools: touch the meson.build files when regenerating icon list.
Even though we only generate makefiles, we actually want to make meson
aware of the list change because it continues using the file list from
the previous configuration. We do this by "touching" the meson.build
files, i.e. editing their access time.

Also rebuild the icon-list as there are small changes forgotten.
2022-01-31 21:52:26 +01:00
Jehan c872dcbf20 app, icons, libgimpwidgets: fix icon's gresources rules.
Now the source images are in the build dirs.

Also:
- clean the EXTRA_DIST contents on autotools;
- add dependencies rules in meson gresources to make sure icons are
  built before resource build;
- finally remove a duplicate build rule in Color Makefile.
2022-01-31 21:37:20 +01:00
Jehan 5a93168a96 icons: actually remove all the now-generated icons.
These are all generated from their SVG source, either with colorsvg2png
(for the Color icons) or gtk-encode-symbolic-svg (for Symbolic icons).
2022-01-31 21:31:12 +01:00
Jehan a0ffddf7fd icons: argh I should not have touched the Legacy theme!
Bad usage of `find`. I didn't pay attention that I removed icons from
the Legacy icon theme which is frozen. Obviously the previous commit was
only expecting to touch Color and Symbolic icon themes.
2022-01-31 20:32:48 +01:00
Jehan b6e0ebc663 icons: removing some now unused icons. 2022-01-31 19:25:24 +01:00
Jehan 8f136abb01 icons: clean the icon list a bit.
- Remove some forgotten lines related to 24x24 vector icons which were
  removed a few days ago already.
- Don't install the 64x64 icons anymore as PNG when in the vector icon
  case. Not sure why we ever did this, but it doesn't look useful.
- This should also fix the CI which was not looking for the tool
  gtk-encode-symbolic-svg in vector icon install.
2022-01-31 18:54:32 +01:00
Jehan ddd9fe8bdc icons, tools: new icon lists for modules. 2022-01-31 17:59:11 +01:00
Jehan c0431df6f5 icons, tools: new 'templates' icon list.
Some points to note:
- gimp-web and gimp-toilet-paper had some usage elsewhere so I also left
  them in 2 of the more generic size files.
- I remove gimp-floppy altogether as it's used nowhere in any of our
  code or data files.
2022-01-31 16:12:19 +01:00
Jehan 9052762225 icons: tool icons are another big group of icons handled all the same. 2022-01-31 15:18:10 +01:00
Jehan d2db539591 icons, tools: start grouping icons by their usage.
There are some clear and obvious groups in the icons. For instance, the
Preferences icons are one of them. Looking up the code, we only use them
in 16px (in Preferences side menu) and 48px (in Preferences page
headers). Until now, we were storing in other unrelated size (22px) and
also the lists per-sizes were not consistent. Some icons were missing
here, other there.

With this new organization, the Preferences icons are listed in a single
file, ensuring usage and contents consistency. Also it allows to install
them only for the needed sizes (note that it is possible that they might
be needed in different size, for instance with custom themes; but we
can't just randomly distribute icons in all sizes; or to be more
accurate, this is exactly why we encourage rather the SVG/scalable
icons, so if some people explicitly go for raster icons, they also get
the drawbacks which come with).

Last note: it may be possible that some icons end up in different
"semantic" icon group. This is not a problem with this new organization
as my scripts handle duplicates gracefully.
2022-01-31 14:52:42 +01:00
Jehan bc999325be icons, tools: new colorsvg2png tool to build PNG out of SVG.
Build-time tool, which basically just rasterize SVG images (it doesn't
do anything special like gtk-encode-symbolic-svg which creates special
PNG for GTK to recolor them).

It looks like I had this prepared since 2018 according to file header,
but I just never finished doing it! :P

Basically now PNG icons of the Color icon themes do not need anymore to
be committed in the repository. They will be generated from the SVG
icons.

Also adding a missing icon from the 16px list (the Playground icon for
Preferences dialog was needed in 16x16 as well, yet missing).
2022-01-31 14:52:42 +01:00
Jehan 0747db5bff icons: 24x24 SVG icons are redundant.
It may actually be meaningful to have redundant vector icons at specific
size, for instance when you want sligthly different designs (e.g. more
details at bigger size). But here looking at our 24x24 vector icons, it
doesn't look like it at all. It's mostly the exact same icons,
duplicated (with some forgotten).

Makes no sense here. So let's simply install the scalable/ icons for all
size, and that's it.
2022-01-31 14:52:42 +01:00
Jehan 4a00c109a0 icons: clean up old lists.
Argh I had forgotten to clean up old icon lists on meson (now that it
uses the common icons/icon-lists/ listing.
2022-01-27 21:10:56 +01:00
Jehan 6e9b137f50 icons, tools: allow newlines in the icon lists.
This is nicer for icon organization, allowing to group them by
categories (Freedesktop, GTK and GIMP namespace icons).
2022-01-27 16:18:55 +01:00
Jehan 7a2f4b82f0 icons, tools: add a comment to generated icon-list.mk.
Just so that someone who happens to look in there is not tempted to
modify these files directly and get some instructions.
The comment is inspired from other similarly generated Makefile.am (i.e.
in plug-ins/commons/).
2022-01-27 01:00:20 +01:00
Jehan 3ed7c92f25 icons: regenerate the icon-list.mk-s with the new tool.
The lists are still exactly the same (except for one icon file whose
name the script fixed, which proves its usage/need even starting this
initial commit).

Now we also get more consistent tabbing than the manual one. Only
missing thing is that it was nice to separate some icons by categories
for easy reading. Maybe later.
2022-01-27 00:49:51 +01:00
Jehan fc12d9e414 tools: new tool to generate the icon-list.mk-s from icons/icon-lists/…
… listing.

This way, both the Color and Symbolic icon themes, both on meson and
autotools build systems all share the exact same list of icons.

I think there are still improvements to be done on what we list and
chosen sizes and icon categories. But this step is about just getting on
the same state as we currently are, simply with shared listings. Once we
are there, we can go forward.
2022-01-27 00:49:12 +01:00
Jehan 8aee873c95 icons: remove use of meson 'fs' module.
I realize that this module is available since meson 0.53.0 though our
current requirement is meson 0.50.0.
Note sure why meson was not popping any warning (normally it does when
we use a feature younger than the minimum requirement; but maybe this
doesn't work for modules).

Anyway this does the same thing without the 'fs' module, and maybe even
better (we know which icons should be converted or used from source, no
need to add any test logics here).
2022-01-26 16:43:18 +01:00
Jehan 784a209ba2 icons: share the same list for symbolic and color icons in meson.
Now we get back (slowly) to something a bit saner, with a common list
shared on both icon themes. This way, we make sure we won't miss any
icon when we will add/remove/change any icon.

This is only for the meson build right now, but next step is to use the
same list in the autotools build as well. This will get maximum
consistency across build systems.
2022-01-26 02:48:30 +01:00
Jehan 11183f4fa4 icons: have -Dvec-icons=false option work with meson.
The whole logics of creating specially prepared PNG images for vector
icons (with gtk-encode-symbolic-svg) was absent. This option was
basically completely broken, yet we now know that we need the ability to
install PNG alternatives for the icons (see #6821).

This is a continuation of previous commit which is straightening a bit
our whole icon theme builds. Note though that more needs to be done
because I definitely still see room for more mess and far too much
duplication.
2022-01-26 01:04:27 +01:00
Jehan ae861e01cd icons: sync all icon lists between autotools and meson.
Some icons were missing on one side or another side, though mostly on
the meson build. Also the option -Dvec-icons=false was basically
completely broken and clearly untested, most likely ever since the
original meson build contribution.

This commit doesn't even completely fix the non-vector icon rule,
because even the file names are wrong, and the bitmap icons are not even
constructed from their vector counterpart! I am going to fix this in the
next commit.
2022-01-25 22:12:38 +01:00
Jehan 996e5ef1eb icons: fix missing icons with the --disable-vector-icons option.
We should really get back to a single shared list as we have in
gimp-2-10.

Also just keeping the "no SVG icons" option feels wrong to me, yet it
turns out librsvg is quite a problem because of Rust, so recent versions
are just not available on many platforms (see #6821). This is what
blocked me so far to remove this whole listing of PNG variants for our
vector icon themes. Otherwise they would be gone by now.

I really wonder as well about all these size categories. Not that they
are not needed when in PNG format, but because it feels like nobody has
really taken the time to list which icons are needed in which size for
years. We really need to do some cleaning in this area.
2022-01-24 17:21:08 +01:00
Jehan cb11eca109 icons: fix build rules for icon theme. 2021-12-23 12:55:11 +01:00
Aryeom Han e49c0e48bd icons: new lock icons for Color icon theme.
Will tweak them again later. It's just for a first version so that there
are no missing icons.
Unlike the Symbolic icons, the lock design is custom.
CC by-sa International 4.0.
2021-12-23 12:55:11 +01:00
Aryeom Han 09654a421f icons: new lock icons.
To better explain the lock icons, have specific icons instead of reusing
other icons. We also tried to programmatically add the simple lock icon
over the other icons, but we only got ugly render. Better have
custom-made icons.

The gimp-lock icon is the Adwaita system-lock-screen icon, by Jakub
Steiner, simply renamed. Therefore its license is GNU LGPL v3 or
Creative Commons Attribution-Share Alike 3.0.
The other icons are derived from a mix of this same icon and other icons
in our existing set and have the same license too.
2021-12-23 12:47:28 +01:00
Aryeom Han 9efe6014e4 icons: new icon gimp-multi-lock. 2021-12-23 12:47:28 +01:00
Jehan 68851c1aaa Issue #5875: Close button too big on wayland backend.
The issue is that on X11, the window manager draws the title bar hence
uses the window-close button from the system theme, though on Wayland,
GTK draws its own decorations. Since we provide a window-close, we end
up with a disparity between this button and the minimize/maximize
buttons.

For now, let's just get rid of the window-close icon as an easy
solution, thus GIMP will always use the window-close icon from system
theme.

Maybe we can restore our own window-close icon later, but we should make
sure to at least have also window-maximize and window-minimize icons so
that the 3 buttons next to each others won't look too mismatched. And
probably we should also have smaller-size design because it doesn't look
so nice when huge (though it might simply have been the size mismatch
which gave this feeling).
2021-07-05 11:04:13 +02:00
Jehan 35ef549028 Issue #5879: Legacy icon theme not installed with meson build.
Actually most of the build code was already there but the initial meson
contributor commented the Legacy icon theme out. Not sure why.

I only had to fix a few icon names, which changed into Freedesktop
standard names after commit 1e5cf10585. Other than this, existing meson
build rules seem to work fine AFAICS.
2021-05-22 18:28:58 +02:00
Aryeom Han 603e912dc3 Issue #6179: New Icon for Paint Select Tool.
Based on original very nice designs by Yash Arya.
2021-04-26 02:07:06 +02:00
Jehan 78fabc1e47 icons: (meson) install the new icons for the Paint Select tool. 2020-11-24 21:59:45 +01:00
Thomas Manni e1cdb9f54e app, icons: add Paint Select tool in the playground
A -quick done- first step towards the addition of a smart selection tool.
Require the gegl:paint-select workshop operation.
Still LOT of work to do (wip):
- fluctuations removal (GEGL side)
- multilevels pyramid approach + banded graphcut for instant result on large
   image (GEGL ? GIMP ?)
- Gaussian Mixtures for color models (GEGL side)
- drawable offsets (GIMP side)
- undo / redo (GIMP side)
- scribbles edition mode (GIMP side)
- dedicated icons
- ...
2020-11-24 12:10:40 +01:00
Jehan c6063183d3 Issue #4922: install software-update-available from Adwaita on hicolor.
I took the icon directly from Adwaita repository as of today's version:
https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/blob/master/Adwaita/scalable/status/software-update-available-symbolic.svg

By being installed on our local GIMP-only hicolor, this gets picked up
after any custom theme software-update-available version. I didn't
install it inside the Symbolic or Color theme because anyway Adwaita
seems only to provide a single vector version. There is a color version,
yet as PNG icons and installed in the legacy/ section. I don't think it
makes sense to use an icon considered as legacy by its author and
without vector version. So I just install the symbolic version and all
themes can fallback to it (be them symbolic icon themes or not).

This icon comes from the Adwaita repository and is therefore licensed
under the terms of either the GNU LGPL v3 or Creative Commons
Attribution-Share Alike 3.0 United States License. See:
https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/blob/master/COPYING
2020-10-24 19:43:40 +02:00
Jehan 68e0463501 icons: (meson) gimp-curve-point-* icons were not installed for the…
… Symbolic theme.
It was installed for the Color theme, but not the Symbolic one with the
meson build.
2020-09-27 18:55:03 +02:00
Jehan 3fb28202f0 icons: remove old file move error.
It seems to be an old file move error I did 2 years ago (commit
1e5cf10585). I wonder how I only realize this now. Anyway let's remove
this lonely file.
2020-09-21 19:14:18 +02:00
Jehan 8cb02716d6 icons: modify dialog-information to work around a librsvg bug.
So it turns out there are still a few bugs in librsvg position/size
computation. One of them is described in my comments:
https://gitlab.gnome.org/GNOME/librsvg/-/issues/250#note_900325

To work around them, I had to increase stroke width of a SVG <circle> to
be over 0.5px.
2020-08-28 20:25:41 +02:00
Jehan 05de70e002 icons: add all missing icons in the main SVG files.
In particular adding the new gimp-curve-point-smooth|corner,
gimp-pivot-*, gimp-text-dir-ttb-*, gimp-transform-3d-* and
gimp-tool-transform-3d icons.
2020-08-28 20:25:40 +02:00