Hacker News new | ask | show | jobs
by lavabiopsy 1733 days ago
If you mean GTK3/4 supports system themes, then no, that's false, it has never really supported doing that. The theme was meant to only be changed by the app, users changing the theme was always consider unsupported. Of course you could previously attempt to override it by setting an environment variable but this could cause any number of things to break because of missing or incorrect CSS classes. These distros were warned about this issue a long time ago.

Just to clarify: The reason for this is not because GTK's CSS classes themselves are not stable (you are correct that they are stable). The issue is that a theme's CSS classes cannot possibly be stable with respect to any given app's CSS classes, unless the app has explicitly enabled that theme, which is not possible with the current API. If you are using the environment variable then apps do not even have a reliable way to check which theme is loaded.

The feeling with GTK4/5 seems to be that GTK itself should only supply some basic default styles and should not bother handling theming at all. Instead that should be handled by another library which knows more than GTK about which CSS to load and when. This is what is essentially being done with the libadwaita theming API.