Since I upgraded to Ubuntu 18.04, Okular doesn't follow the Adwaita-dark or Arc themes when I set them with the Gnome tweak tool. Is there any way to fix this? All I really want is for Okular to use dark colors for its menus and toolbars.
Edit: When I try
GTK2_RC_FILES=Adwaita:dark okular
from the terminal, I get a bunch of errors like
(okular:16699): Gtk-WARNING **: 22:58:15.581: Theme parsing error: gtk.css:137:54: Using one color stop with linear-gradient() is deprecated.
(okular:16699): Gtk-WARNING **: 22:58:15.587: Theme parsing error: gtk.css:1839:9: Expected a string.
(okular:16699): Gtk-WARNING **: 22:58:15.590: Theme parsing error: gtk.css:2913:17: Using Pango syntax for the font: style property is deprecated; please use CSS syntax
I've also tried downloading systemsettings and kde-config-gtk-style and activating the themes there, with no response.
Best Answer
What worked for me was:
This is taken from the ArchLinux documentation. It also recommends setting the
QT_QPA_PLATFORMTHEME=gtk2
environment variable, but I did not need that.See also this other AskUbuntu question, this solution applies to all KDE applications.