What happened?
This should only occur when someone is using strawberry
which is a qt
application on a gtk
based desktop environment (DE) such as Gnome
or Budgie
, it works fine on Plasma
.
The change that broke gtk theming in strawberry
was me switching it from a qt5
build to a qt6
build. So I assume breakage of gtk theming on qt apps will happen to all applications that switch to qt6
.
What are you going to do about it?
I have seen the issue reported for multiple distros that have switched to the qt6 build with seemingly no out-of-the-box fixes. If I can fix it simply without causing other issues, I am open to it. However I do not consider theme breakage of a qt app on a gtk DE to be a valid reason to rollback the qt6 change. qt apps are built with a qt DE in mind such as Plasma and all well maintained apps will move to qt6 so I am not going to just kick the can down the road.
I have been informed that qt6gtk2 would solve the issue but it has no stable releases, which means it would require a waiver by the Solus team to be included in the repository.
qt6gtk2
failed to compile for me in my initial packaging efforts, I assume I need these new qt6 macros merged first for qmake6.
Additionally compiling/installing the package is not enough.
Add line 'export QT_QPA_PLATFORMTHEME=qt6gtk2' to ~/.profile and re-login.
Alternatively, create the file /etc/X11/Xsession.d/100-qt6gtk2 withthe following line:
export QT_QPA_PLATFORMTHEME=qt6gtk2
Requiring users to add a line to a file to fix it is not acceptable to me, any solution should require 0 user intervention so it'll happen in package.
Your home directory will never be touched by the package manager as matter of policy, as that is user space. So adding it ~/.profile is a no go. It could be added to /usr/share/defaults/etc/profile however.
I do not know how it worked on qt5 and if it required a similar environment variable or if adding that line will have any impact for Plasma users. Pinging @Girtablulu for his opinion.
EDIT:
Yeah I know what girt will say and its the same as my opinion. I used qt6ct
as discussed here and it is a hard no from me. 1 the dark theme wasn't great. 2 it seemed buggy. 3 the exported variable will affect plasma users negatively (obvious now I actually think about it) so there is no possible OTB fix atm for qt6 builds. Absolute best we can do is is provide qt6ct
in the repo so people can install it, export the variable and force a not so great dark theme manually. 🙁