Symbolic Icons / SVG Icons that get recoloured
ebassi at gmail.com
Wed Mar 20 14:31:24 UTC 2019
On Wed, 20 Mar 2019 at 13:16, David Edmundson <davidedmundson at kde.org>
> Turning the list of differences into an actionable TODO list the
> following changes would be needed by both parties to have exact
> feature parity:
> GTK changes:
> - Add 2 new CSS classes "bg", and "highlight"
What would be the semantics of these two classes?
The main problem is that the re-coloring on icon loading is part of the
and we cannot change that for GTK 3. For GTK 4 it would be possible to add
more colors, but the API would get pretty busy.
Additionally, we use SVG recoloring as a fallback path, given the cost of
loading SVG icons all over the place, and the optional dependency on
librsvg; we generate pre-sized, recolored variants of the SVG icons
re-encoded as specially crafted PNG files at build time for the assets that
GTK itself ships:
the tool is also installed, so icon theme authors can re-encode their own
There's also the added fun that GTK may or may not support SVG assets
depending on whether librsvg is installed. So we may be able recolor
symbolic icons even if they are not actually SVG assets.
- apply SVG CSS injection to include non-symbolic icons. On icons
> that don't end in "-symbolic" we should set the foreground colour on
> the .fg class not to all SVG paths
The API for loading non-symbolic assets does not take colors, so we cannot
apply a style class.
In any case, could you open an issue at:
and reference this thread?
[@] ebassi [@gmail.com]
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the xdg