Open chenxiaolong opened 3 years ago
It's a long time issue for me, little workaround is too set color scheme through systemsettings5
I tried doing a git bisect between 5.14.2 and 5.15.2, but didn't have much luck. qtbase is easy enough to bisect, but the KDE libs require many of the other 40+ qt5 git submodules and it's very tedious to get them to compile.
As a workaround, I installed kvantum and set up Kate to use the KvGnomeDark
color scheme.
(Apologies if this isn't actually an adwaita-qt issue. I'm not super familiar with the interactions between qt, adwaita-qt, and kconfigwidgets yet.)
With applications like Kate, which use KColorScheme and KColorSchemeManager, it seems that adwaita-qt's
adwaita-dark
style doesn't get applied properly if the system is running qt 5.15. For example, this is what I see: Screenshot from 2021-03-09 18-04-38I've confirmed that
adwaita-dark
is actually being used by adding:to adwaita-qt's
Style::Style(bool dark)
constructor, which printed out:It seems that the issue stems from kate calling:
https://github.com/KDE/kate/blob/997aa7231330b92244e2f6d7bc7064b2964034dd/kate/katecolorschemechooser.cpp#L40
though things work on qt 5.14. If I comment out the
activateScheme
call, then the adwaita-dark seems to be successfully applied.activateScheme
is defined here (in kconfigwidgets):https://github.com/KDE/kconfigwidgets/blob/6bb1826717e71926936df6706aa02730fb0b413f/src/kcolorschememanager.cpp#L35
which calls
qApp->setPalette
using a palette from:https://github.com/KDE/kconfigwidgets/blob/6bb1826717e71926936df6706aa02730fb0b413f/src/kcolorscheme.cpp#L685
So far I've tried the following scenarios:
Any ideas on what might prevent adwaita-dark from working here? Could there be some sort of incompatibility with adwaita-qt + qt 5.15 (vs. 5.14)? Am I barking up the wrong tree filing this bug report here?
I'd be happy to try and do a git bisect of qt between 5.14.2 and 5.15.2 if there's a good chance that it's an upstream issue.
Thank you!