Ubuntu – Override theme background color for certain applications

colorscustomizationeditorthemes

When using a custom theme (Equinox Evolution Midnight in my particular case) the manager at System > Preferences > Appearance > Theme > Customize > Colors is indeed reflecting the actual system-wide styling, but, turns out certain applications (LibreOffice, Bluefish Editor and many others) are actually overriding that theming as they display a white background. So I was wondering if there's a sort of centralized way to manage such exceptions (as in fact I'd like to have all my text editors overriding the dark background) or I should set that up in a per-application fashion?

Any guidance will be sincerely appreciated, thanks much in advance.

Best Answer

Firstly, the GTKParasite application does not handle themes at all. It might be useful to detect if the misbehaving application is a GTK application at all and determine the class of the editor widget. In Windows-speak, it is the Spy++ of GTK.

Changing the editor color affects the lot of applications that directly use the GtkText widget (and to some extent the GtkSourceView widget at the root of syntax coloring editors like gedit and geany).

Applications like Firefox and *Office are not real GTK applications, they have their own cross-platform widget set that render GTK decorations but do not have the association to the real text editor class.

Bluefish is a real GTK app but seems to implement its own text editor widget since it does not look like GtkSourceView or SciTe at all. You will probably find a lot of applications that jump to the conclusion that all text background should be white, and changing them globally won't be possible without some per-application-tweaking.

Related Question