Make stock icons copied from GIMP maintainable
Problem:
- Copying random GIMP stock icons from random GIMP icon themes into random places with random filenames in gimp-help does not scale, maintenance-wise. And icon themes evolve.
- Random but representative example: See the tool icon in https://testing.docs.gimp.org/2.99/en/gimp-tool-mypaint-brush.html#idm11960
Rough proposal:
- Manually map currently existing icons all over the place in gimp-help with GIMP stock icons. (@aklapper looking into this for now)
- Create a folder structure in the gimp-help repository to hold all stock icons copied from GIMP, regardless of the location of the Docbook page(s) they are embedded in, to allow documentation maintainers to find all stock icons at a glance without having to grep.
- Could instead also agree on a common filename prefix and keep them under
images/C/
but that'll again increase maintenance costs as we'd have to manually rename (prefix) files everytime we copy a stock icon image file from GIMP into gimp-help?
- Could instead also agree on a common filename prefix and keep them under
- Move existing stock icon images into that dedicated new location while updating corresponding paths in Docbook pages.
- Rename stock icon image files to resemble their icon names in GIMP (to not require some custom filename-to-filename mapping) while again updating corresponding paths in Docbook pages.
- Replace existing gimp-help stock icon image files with the current GIMP ones (copy both scalable and scalable-symbolic version from GIMP into gimp-help, while sticking to displaying non-symbolic for this step).
- For scalable non-symbolic, this requires converting SVG to PNG (can we batch this? What's the preferable pixel size given HiDPI screens these days (I'd go for 32x32)? Does Docbook markup allow defining the width and height to render an image so we'd stay flexible?)
- Covering symbolic icons will require how to do SVG to PNG conversion as the symbolic color would need to get inverted.
- What does that mean for output formats, e.g. if web browsers are locally set to 'dark theme'. Does that imply that the PNG should not have an alpha channel but a white non-transparent background?
- Have a concept how many icon theme variants to display on Docbook pages - for now probably only non-symbolic not to complicate things, but in a future step also display symbolic next to non-symbolic? Should legacy be displayed too (I'm not in favor of that)?
- Finally, document stock icon copying/SVG-to-PNG conversion workflow in gimp-help style guide for doc maintainers.
Pre-preparations:
Break up / isolate icons in custom 'compound' screenshot images that highlight one or more specific icons into each icon file itself:
-
Replace dialogs/lock*.png
screenshots with their corresponding stock icons in c3e453a1 -
Replace tool-options/affect-*.png
screenshots by their corresponding stock icons in 174b0b74 -
Replace dialogs/icon-navigation.png
with the corresponding stock icon in !176 (merged) -
Replace dialogs/brushes-buttons.png
with their corresponding stock icons in !214 (merged) -
Replace tool-options/rectsel-mode-*.png
screenshots with their corresponding stock icons in !216 (merged) -
Get !239 (merged)/#438 (closed) resolved/merged because less collisions, potentially also !213 (merged) -
Ideally get !246 (merged)/#439 (closed) resolved/merged because more consistency (but not a hard requirement)
Edited by Andre Klapper