With GTK4 we cannot obtain the selection theme colors, so instead use ThemeAdwaita which uses the colors from the default theme used by GTK.
Created attachment 396080 [details] Patch
With GTK3 the selection colors are actually deprecated, so this is also a problem if we want to completely remove deprecated API usage. Do we want to continue using them?
I meant the style context selection color APIs, for what it's worth.
(In reply to Claudio Saavedra from comment #2) > With GTK3 the selection colors are actually deprecated, so this is also a > problem if we want to completely remove deprecated API usage. Do we want to > continue using them? Carlos Garcia specifically added ThemeGtk to have a minimum degree of integration with the system theme, so I think we should keep using it for now when building against GTK3.
(In reply to Adrian Perez from comment #4) > (In reply to Claudio Saavedra from comment #2) > > With GTK3 the selection colors are actually deprecated, so this is also a > > problem if we want to completely remove deprecated API usage. Do we want to > > continue using them? > > Carlos Garcia specifically added ThemeGtk to have a minimum degree of > integration with the system theme, so I think we should keep using it > for now when building against GTK3. Yes, let's add deprecation guards if needed.
Created attachment 396304 [details] Patch v2 Same as before, adding deprecation guards in ThemeGtk.cpp
Committed r260058: <https://trac.webkit.org/changeset/260058> All reviewed patches have been landed. Closing bug and clearing flags on attachment 396304 [details].