https://bugs.kde.org/show_bug.cgi?id=502682

            Bug ID: 502682
           Summary: Compatibility with GTK symbolic icons (GTK icon
                    recolorization)
    Classification: Frameworks and Libraries
           Product: frameworks-kiconthemes
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: wishlist
          Priority: NOR
         Component: general
          Assignee: cf...@kde.org
          Reporter: fedin-ilja2...@ya.ru
                CC: kdelibs-b...@kde.org
  Target Milestone: ---

SUMMARY
Being compatible with GTK's icon recolorization could made icon themes made
primarily for GTK desktop environments way more usable in KDE. GTK also allows
icons provided by applications to be recolored unlike KDE's way (since
kiconthemes requires FollowColorScheme=true in index.theme which hicolor
doesn't have) so various icons provided by applications could render better
with this, too.

GTK uses `-symbolic` icon name ending as a sign the icon has to be recolored.
By default, it recolors all elements with text color but if the element has one
of the following classes:
* error
* warning
* success

They are recolored into the following colors accordingly:
* red
* orange
* green

The exact default values are:
https://gitlab.gnome.org/GNOME/gtk/-/blob/a6792b83e33a4e2bc3143dd626b345f5c27d858c/gtk/gtkicontheme.c#L3862-3865

It seem to be themable using GTK themes though:
https://gitlab.gnome.org/GNOME/gtk/-/blob/a6792b83e33a4e2bc3143dd626b345f5c27d858c/gtk/gtkcssstyle.c#L871

Here's how the classes are injected into SVG:
https://gitlab.gnome.org/GNOME/gtk/-/blob/a6792b83e33a4e2bc3143dd626b345f5c27d858c/gtk/gdktextureutils.c#L208

They also seem to support recoloring PNG but not sure how much that's relevant
for kiconthemes:
https://gitlab.gnome.org/GNOME/gtk/-/blob/a6792b83e33a4e2bc3143dd626b345f5c27d858c/gtk/gtkicontheme.c#L2117

As a starting point, this could be enabled only when KDE's icon recolorization
is not enabled, i.e. when the icon theme's index.theme doesn't have
FollowsColorScheme=true

STEPS TO REPRODUCE
1. Use an icon theme made for GTK DEs or an application providing a symbolic
icon made for GTK

OBSERVED RESULT
Icons are recolored as in GTK DEs

EXPECTED RESULT
Icons aren't recolored and look broken

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to