st: Stop using GTK for icon loading

Florian Müllner requested to merge fmuellner/gnome-shell:icon-theme into main

GTK4 changed icon loading significantly, it is now closely tied to snapshots and paintables. This makes a port highly unrealistic, so to avoid staying stuck on GTK3 forever, copy the relevant code into the tree.

While a couple of changes are necessary to integrate it outside the GTK codebase (and a couple of low-hanging cleanups were just too tempting), there are few "real" changes:

  • integrate with StSettings instead of set_custom_theme()/GtkSettings
  • use StIconColors to pass in symbolic colors instead of GdkRGBA

That doesn't only mean that the loading code is unchanged, but also that there's a fair bit of API that we aren't currently using ourselves. Stripping that API down will make for a good future cleanup, but we should first look into automatic icon loading for extensions (like: if an extension includes an icon/ folder, automatically include it in the search path while the extension is enabled).

Merge request reports