-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configured theme not applying to all applications #38
Comments
little follow-up that provides more information: I did some digging and apparently both KDE Connect and Tokodon are built with Kirigami, whatever may be the cause is probably in relation to that. In fact, I found this reddit thread talking about the exact issue at hand; but it doesn't seem to point to anything that could be of use. |
KDE uses its own color scheme engine called KColorScheme (ignoring QPalette and Qt theme colors) and Kirigami applications are built on top of QML that qt5ct has no theme control for. The Qt's default for QML applications is the Fusion theme on Linux (just like for widgets) but KDE has its own theme called qqc2-desktop-style that allows applying widgets themes to QML applications. KDE applications are also made for their own icon engine called KIconEngine that applies KDE color schemes to svg icons so when the engine is not used you're likely to see things like black icons on black background. I have a patch adding KColorScheme/KIconEngine/qqc2-desktop-style support to qt5ct, packages with it are available for NixOS and qt{5,6}ct-kde on AUR. An important thing is to have a KDE color scheme for your Qt theme and apply it in the patched qt5ct or the result will be screwed as KDE applications use colors from both KDE color schemes and Qt themes. It enumerates such color schemes but doesn't show a difference in preview (as I'm too lazy to implement this, it's good for me as is). In an ideal world, KDE applications should apply all the custom theming on their own like Qt applications with branded design do on Windows/macOS but it seems there's no people interested in doing such changes in the KDE coomunity. |
Kirigami is not the issue, as it also doesn't apply to KDE 6 apps like Dolphin and System Settings using qt6ct. |
System Settings do use Kirigami. Although you're right that it's not only Kirigami, it's KColorScheme framework which is used by both QML and Widgets KDE apps. |
But does Dolphin use Kirigami? And Haruna? And Amarok git, built with Qt 6? And Okular? Because it doesn't work in those apps either. And if System Settings only partly uses Kirigami, I'd expect the theme to at least partially apply. Btw, I tried your patch on Arch Linux with qt6ct from git, but it doesn't solve the issue. |
As I said, it's not Kirigami but KColorScheme. And yes, all KDE applications use KColorScheme.
Did you choose a color scheme with it that has a |
But then what changed with KDE 6? Because I never had issues like this with KDE 5 apps. Yes, I chose Breeze Dark. That's one of the two default KDE themes, so it should be good. Except that it isn't. |
Can you provide your Qt-related environment variables? |
|
Can you reproduce if you run affected application in that terminal session? |
Then it seems to work fine. |
Scratch that: it did apply the correct colors, but not the theming engine. |
So the issue is that you have set |
Please see my message after that one. 🙂 (And I have set that variable in /etc/environment, just like I used to do with qt5ct.) |
Some KDE applications like Dolphin hardcode theme for non-KDE sessions now |
But I'm using KDE. |
Then you don't really need qt6ct? Setting qt6ct would make that logic to think you're using a non-KDE session. |
But using qt6ct I can disable cursor blinking, which is not supported by KDE itself. I was advised to use qt5ct for that on KDE 5, but I clean installed Arch Linux with KDE 6 last week, so now I need to use qt6ct to achieve that. And because of that, I also need to set the theming engine through qt6ct. |
That logic seem to force the Qt style from kdeglobals so setting it via both qt6ct and system settings should theoretically do the thing |
Could you explain that a bit more? Like I said: I did use this exact same setup with qt5ct without any issues. |
You don't know how to set Qt style via system settings?
As you can see the linked issue in kiconthemes, it's done in KF6, not KF5 |
I have set it in system settings, but it doesn’t make a difference for the majority of apps, including the ones I listed earlier. |
What those commands return?
|
|
Could it be that you have kvantum installed only for Qt 5? |
Nope, kvantum-qt6 is installed and qt6ct and FeatherNotes do use the Kvantum theme I set, so it's partly functioning. |
The only idea is maybe there's a miscommunication. Can you upload a screenshot of how it looks wrongly and (if possible) how it should look like? |
I have no idea what changed, but suddenly it's working now. Thanks for all of your help! 🙂 |
Actually, scratch that: it works for a moment in for example Dolphin, but when I close Dolphin, it reverts to Breeze. Then I re-apply qt6ct as theme engine in System Settings and Dolphin looks fine again until I close it… |
I mean maybe you can provide a screenshot of qt6ct settings or the content of |
Sure, here you go:
|
I have asked:
You answered:
But this one
Is not a KColorScheme. |
Important thing is to choose a color scheme containing |
I know, but in the GUI of qt6ct it is set to Default and not the darker color scheme. So then it must be a bug in qt6ct. |
Right, your config also has
But my point is that it won't work with neither Default nor darker. You need a KColorScheme for KDE applications to look properly. In the Plasma session, you always have a KDE color scheme set (Breeze Light by default). |
I have a KColorScheme set. |
But the config says you don't. You have |
Maybe you configure qt5ct instead of qt6ct? |
Then there still is a bug somewhere, either in qt6ct or in KDE's systemsettings. |
Nope. |
Hm. Can you provide a screenshot of your qt6ct settings (the first tab)? |
But the color scheme from KDE systemsettings I have set is not available in that drop down list. |
Are you sure you're using my branch? It's available only there. |
Yes, I have manually compiled your branch qt6ct ‘shenenigans’. |
Are you sure you have no other qt6ct instance installed? Maybe you're launching that one instead of the compiled one. |
On Arch you can just install qt6ct-kde package from AUR. |
Nope, other one is not installed anymore. And qt6ct-kde from AUR also doesn't have the correct color scheme in the drop-down list. |
I wonder where the correct color scheme is located in the file system? |
Even if you launch it with |
No, then it looks right. I guess there's a bug in Arch somewhere then. |
It might be not easy to override QT_QPA_PLATFORMTHEME in a Qt desktop environment such as LXQt... |
If xdg-desktop-portal-lxqt supported org.freedesktop.appearance.color-scheme parameter, it would just work I guess, even without qt6ct... |
If merged, this should restore the possibility to change color scheme via kdeglobals when there's no portal. |
Great! Thanks for putting the time into that MR. 🙂 |
@Vistaus I was told you can specify your color scheme like
Usually it gets specified in app config file (e.g. On other hand, applications having color scheme chooser in UI (e.g. Elisa) seem to write ColorScheme setting with empty value to their config file if it isn't present what shadows the value in kdeglobals. But then you can easily select your color scheme in their UI. |
If no answer, I would assume it works and will close the kcolorscheme MR |
I've used qt5ct and qt6ct to set custom styles for my qt apps, this works great for most apps and I've been using that.
But there's a bit of snag, KDE Connect and Tokodon seem to ignore the configured style.
Ark left has the theme applied; whilst Tokodon and KDE Connect fall back to their default light theme.
I have noticed that Kde Connect and Tokodon are a bit different compared to other Qt apps with a header bar and more mobile-forward and responsive layout; but I don't see why they wouldn't be styled by the Qt theme.
I can however confirm that this shouldn't be a configuration issue as both Qt5 and Qt6 applications work fine and without any major issues.
The text was updated successfully, but these errors were encountered: