Styling Qt5 Apps with qt5ct - simple text file edits work fine
All, Dropping a note for anyone who has Qt5 apps running not under Plasma. Take for example keepassxc. The default dark style is fine, but if you install anything that adjusts the Qt5 style, it will revert to white and is quite blinding. One workaround is to install qt5ct (Qt5 Configuration Tool) which does come with a few themes. Only problem, the darker theme has hideous alternating row colors in keepassxc. (configured with darker colors and fusion qss) Thankfully the colors for everything are in a simple text file that you can change to suit your needs. The install will put the themes color files in: /usr/share/qt5ct/colors/xxxxxxx.conf (where xxxxxxx is the name for the color theme) You can simply copy a theme to modify from /usr/share/qt5ct/colors to your user config location in: ~/.config/qt5ct/colors/ You can then modify it to your hearts content. Use a color picker like kcolorchooser or the one in qimp or the gtk-color-chooser to find the color you wish to change in a Qt5 app, then just edit your copy of the .conf file (rename it too to some name you want for your theme). Then simply run qt5ct and select the color theme from the drop-down and hit "Apply". For the darker.conf theme hideous alternating row colors, simply change #ff5c5b5a to #ff434343 and things will look at LOT better. Change in all 3 lines (active, disabled, inactive). If you make sure that is the only color in the line (#ff5c5b5a is), you can simple use sed to fix it: sed -i 's/5c5b5a/434343/' ~/.config/qt5ct/colors/yourtheme.conf done. Hopefully this helps someone else faced with unbearable Qt5 color themes when running a Qt5 app not under plasma. -- David C. Rankin, J.D.,P.E.
participants (1)
-
David C. Rankin